SambaPOS 5 Bulk Product and Inventory Importer

Good on ya! I have recently been approached to possibly become the Tech for a new POS “company” here. Not sure I want to have the extra work though, lol. Between my 2 Venues, Beta Testing, Forum support, etc, it really cuts down on my “social” time :stuck_out_tongue_winking_eye:

2 Likes

Hello,

I am using samba version 5.1.58 [DB 124]. I have downloaded and Install wampsever 2.5. I extracted the zipped files above into the “www” folder of the wampsever and edited the connection string as follows;

I selected Opera as my browser during wampsever installation, then i tried lunching the interface through Opera with “http://localhost/dbops.php

This is my result obtained;

Other Information;

  1. I am using windows 10
  2. Although wampserver is online, the service is not running and i cant start it

I would appreciate help from the forum. Thank You

I have never used wamp but it sounds like you might want to ask wamp forum if you don’t get a response here.

Edit: it looks like your running IIS and it’s probably attached to your port already.

Thanks Ken,

Can you suggest what you use with this import tool so i can try?

If you can help me with any of your links on this forum on this subject i would appreciate a lot

Thank You

I don’t use this tool but I would probably use IIS myself just so I could serve all my various websites projects with one service.

This forum probably won’t help you much with Web server and PHP setup and install because it’s a Samba POS forum so I can’t provide forum links simply because there aren’t any that I know of.

There are some members with more experience with WAMP that might find interest in your question but I wouldn’t wait around. Google wamp server setup see what you can find.

PS read what I said about IIS and your port likely that’s your issue it can’t start because IIS is already using that port.

1 Like

Kendash is correct. That is an error coming from IIS. I don’t use WAMP myself. I use IIS.

WAMP is “supposed to be” an easy, simple way to get Web Services with PHP up and running on Windows, which is why it is suggested. I tried WAMP a couple times throughout the years, but since IIS is built into Windows, I see no need to install WAMP, which uses Apache as it’s Web Server.

If you really want to use WAMP, you should disable/uninstall IIS. This is done via Add/Remove Programs > Windows Programs.

Here is a link to setting up IIS/PHP that I put together if you want to give that a go instead, since you already have IIS activated …

1 Like

I keep getting the following error when trying to import my csv file

PHP Warning: odbc_execute(): SQL error: [Microsoft][SQL Server Native Client 11.0]Invalid character value for cast specification, SQL state 22005 in SQLExecute in C:\inetpub\wwwroot\dbops_functions.php on line 69

Any ideas what could be causing this

Looks like an invalid character for cast :slight_smile:

Well that part was obvious :smile: What characters would be classed as invalid?

I dont know you have not showed us it yet.

Edit: what version of SQL are you using?

the excel file contains over 1700 products so I don’t think anyone is going to check through that.
If i knew what characters are classed as invalid maybe I could search for them.

Is it not showing the line number where it fails?

No unfortunately that would make it a lot easier

So, no lines are being imported?

What about the query that is being executed at the time? Does it show that?

I just get the error I posted above.

Nothing gets added to the database

Could it be the version of SQL not supporting it?

Ok, weird.

Open the dbops_functions.php file and find this at line 58, and change the $showQuery variable to true, save, and re-run…

    $showQuery=false; // change this to true
    if ($showQuery) {
        echo "<br />QUERY:<br />$query";
        echo "<br />QPARMS:<br />";
	for ($p=0; $p<count($qparms); $p++) {
            $msg2.=$qparms[$p].", ";
	}
        
    }

Also, you have configured the tool to use driver 11 which is SQL 2014. Is that the correct SQL version that you are using?

Ok changing that makes no difference.
Yes driver 11 and SQL Express 2014.

I think it won’t fix the issue. It expected to display more info about failing query.

1 Like

In the file dbops_readfile.php find this line (107) …

$ProductItemType[$r] = (($ProductItemType[$r]!=0 && $ProductItemType[$r]!=1) ? 0 : $ProductItemType[$r]);

Replace it with this:

$ProductItemType[$r] = ((($ProductItemType[$r]!=0 && $ProductItemType[$r]!=1) || $ProductItemType[$r]=='') ? 0 : $ProductItemType[$r]);

Also, you have not set a MenuName in your csv file. You need to do that for every row of data.