Sambapos Error on employee clock

got this after impoerting the reports

try to restore auto backup got this error

Which DB Engine are you using?

What is the name of your Database? Is it SambaPOS4? Or is it something else?

i deleted the reports then manage to use the employee clock

i am using sambapos 4 app 72 SQ db=retail

Ok, so the problem is this:

Each of the Employee SQL Scripts has as the very first line:

use [SambaPOS4]

You can remove/delete that line, or in your case, change it to:

use [retail]

ok thanks but y do we need to declare in the script when in local setting the db has been defined there…asking for my knowledge!!!

You might not need it but it is better to ensure it is working on correct db. Just a nice habit IMHO.

@madiha, as @emre has already mentioned, within SambaPOS you shouldn’t need the USE [databasename] statement at all

However, it is always good practice to have such a statement at the top of any of your SQL scripts to ensure the statements that follow are operating on the correct DB. This would be especially important if you are working in a Query Editor. For example, you could have a Table of the same name in more than 1 database, and if you run destructive queries (updates, deletes), you want to make sure that you are altering the table in the correct DB.

1 Like

ok got it a good practice