SambaPos not starting

Just installed SambaPOS 5 on a windows 10 machine for evaluation.
Keep getting ‘Please restart application. Current problem saved to log file’ message.
Pressing OK is closing SambaPOS5.

Have been looking at sambasettings.txt, ConnectionString is still empty…
I was expecting database connection to be configured from the SambaPos application as well as initial Sample Data.

How to proceed further? Does anyone know location of mentioned log file?.

Update: I found the log file and it seems that SambaPos tries to open/create file in user folder

C:\Users\usernameSambaPOS5.mdf

So it’s missing a \ in the path or is the debug statement not correct?

Got antivirus running, have noticed avast started giving me issues on lermissions, disabling solves.
Blank would be default locally which is the file its trying to create.

1 Like

He probably installed sql local db 2017 if that is the case there is a bug with sql localdb and you need to install an update for it.

Here is the update you need to install

https://support.microsoft.com/en-us/help/4096875/fix-access-is-denied-error-when-you-try-to-create-a-database-in-sql-se

1 Like

Thanks for providing the solution.

1 Like

Next version of Sambapos will have the fixed version of localdb included.

1 Like

Hello Team,

This issue has just popped up for me :slight_smile:

I run SQL 2014 -

Message: CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file ‘C:\Users\POS ADMINSambaPOS5.mdf’.

Seems to just be missing the \

I uninstalled updated dated just before the issue but it did not work.

Working smoothly since 2016

clients are now 5.6.2

Any insight would be awesome !

Hi All,

I am SQL 2014 so above fix N/A

I got it sorted (kinda) I edited the sambasettings.txt to reach the database via the network instead of locally.

all good again.

Data Source=POSSERVER\SQLEXPRESS; User Id=sa; Password=xxxxxxxxx; Database=sambapos5;

Somehow your sambasettings.txt got corrupted or deleted and a default one was generated automatically.

However…

SambaPOS is trying to create a LocalDB database, because the sambasettings.txt no longer had your correct database connection string.

This is exactly the issue as mentioned in the above posts from 5 years ago. There was a known bug in SQL LocalDB 2017 that caused incorrect file path and the fix for that is listed in posts above.

Uninstalling / reinstalling SambaPOS will not fix issues with sambasettings.txt because it still does not know where your database is.

This is all you needed to do, to update the database connection string again.

Note you will also have lost any other local settings like for display, devices (caller ID, scale, etc) when the sambasettings.txt is reverted to the default one, so you should double check those settings on this terminal.

The most common reasons for sambasettings.txt being corrupted is unexpected shutdown of the PC (like power cable unplugged without shutting down properly) - usually when SambaPOS is closing (happens sometimes when staff turn off the terminal at night and close SambaPOS then immediately cut the power to the terminal without shutting down first), and low disk space to the point there is no disk space left to save the sambasettings.txt file when SambaPOS closes.

The first reason you just need to ensure staff know to properly shut down the terminal. For low disk space you should just check the terminal is not running low on disk space. If you let SambaPOS take automatic database backups when ending work period, these will fill up as they don’t automatically get deleted over time - you need to manually delete them, or use third party software like the free SQLBackupFree which automates backups outside SambaPOS and can be set to delete old backups automatically (e.g. only keep last 3 months of backups).

1 Like