Comand Line Parameters for Sambapos?

Is there any way to tell sambapos in the comand line to look for a database or a data source?

Since I am working with SQL, two machines, I was wondering if there is an easy/fast method to change datasource to make testings before going live…

for example: SAMBAPOS sambapos4.sdf (to use the CE database instead of the settings in datasource)



The Data Connection String setting is saved in the SambaSettings.txt file.

There is no command line override for this.
I can make two scripts that could change the SambaSettings file and run SambaPOS if you like.

Dear @JohnS, that would be awsome, sorry, AWSOME!!!

I would really appreciatenit.



I need to know the full path to the SambaSettings.txt file which is possibly C:\ProgramData\SAMBAPOS\SambaPOS4.
And the full path to Samba.Presentation.exe which is probably C:\Program Files (x86)\SambaPOS4

YES and YES!!!
are you looking insde my harddisk???

for SQL: Data Source=localhost\SAMBAPOS; User Id=sa; Password=sambapos; Database=SAMBAPOS4;
for CE: sambapos4.sdf



Can you post your SambaSettings.txt file.

sure!! (672 Bytes)

Place the files in this ZIP into C:\ProgramData\SAMBAPOS\SambaPOS4.
For TEST database, run SambaPOS_test.bat
For LIVE database, run SambaPOS_live.bat (1.8 KB)

I also noticed that your connection string for SQL is Data Source=localhost\SAMBAPOS; User Id=sa; Password=sambapos; Database=SAMBAPOS4;.
You should change localhost to your Servers Computer Name otherwise other computers can’t connect to the database.

*** NOTE - This is a custom setup for gerlandog.
If anyone else intends on using this, you must update the SambaSettings files with your own database details and make sure the paths are correct in the batch files ***

1 Like

My data source in this computer is different for the rest…should it be the same?

My server name is

Wich I use in mynsecond computer instead of loclahost




THANK you very much @JohnS


If you understand the difference, that’s fine. I tend to standardize settings so if I need to setup a new terminal, I just copy over the SambaSettings.txt file after I install SambaPOS.
The only thing left is to set the Terminal Name in SambaPOS and your running.

Ups… I never set up a terminal name in thenterminal…

Would be that a problem?



By default, your terminal name is Server.
Does it make a difference - technically no, but if you have custom menus for specific terminals or rules for specific terminals, then yes you need different terminal names.

Again, as standardization I always name the terminals and set them in SambaPOS.

Just remember that you can refer to not only a specific user in SambaPOS, but also a specific terminal.

I can see that now… I asked this exact same question, a ittle bit more explained in the question category, so Emre has teh possibility to use it as a tutorial for anyone trying to accomplish this.

I can see now that rules have the terminal setting, so… maybe I could have done the printin approach more simple, or even cleaner… I will try to see if I can clean it up…


Sorry if I bothered you so much!!


PD, so, this means, or at least in a fast viewing, that I could have set up only one printing rule, and in the mapping settings would have set up two mappings, one for SERVER and one for TERMINAL. Is that correct? all the other setting, like print job action, printers and print tepmplates still have to be individual (if they are different).


How you setup the rules for printing will depend on your physical setup. To add complexity you are combining two businesses into the one system. Businesses that are in separate buildings.

Yes you need 2 rules/print jobs/printer templates for receipts because you have different business names, but your kitchen tickets can be the same.
If your kitchen printers are setup as a local printer on the ordering terminals, then rename these to kitchen (like we did for Receipt printer) then set the kitchen printer to use that local printer.
If any of that makes sense :smile:

What will your physical setup be? What computers will you use and where. And what printers will you use and where.

ok… you got me there, jajajajajajjajajaja
i have two buildings, two kitchens, two computers, two printers. Still did not set up kitchen printers, I have to buy and install them first (still in process of growing).

I have set up two departmets
now i have two terminals
i have two printers
i have to ticket types
i have two templates (i missed that one line, the restorant name and logo, is different)
i have only one print bill action (automation command)
now…i have made two actions, one for each building/printer (here it seems that i could set up only one action with two mappings)
i have to rules, one for each building/printer (here I assume that I could also spared one rule and mapped them twice).

up here all is correct or at least good enough to work?



Because you have 2 different printer templates, you need 2 rules, and 2 actions.
You could use 1 action, but for simplicity 2 is better to fault find with.

When setting up, keep the workflow straight forwarded and simple. When you have it working right, then look at reducing rules and actions. But be careful not to get too clever as it gets harder to fault find.
Always use descriptive names for both actions and rules so they are easier to follow.


I think, i am good for now, today is the “D” day. We start using the SQL database today…
I am starting to add stock to the inventory today, so we can test it in real life…