Error message on SambaPOS startup

anyone getting this error on startup “Please restart application. Current problem saved to log file.” cause when i click the ok button it closes sambapos but doesnt show any log file to see where error is.

first i taught it maybe was fault somewhere with dutch translation so installed the english version but get same error also checked samba data if there was anywhere the log file but no luck

Check the Log File in your SambaPOS5 folder in your documents.

Sounds like a Database issue.

thx just found your post relating to same prob

am now trying QMcKAY solution :wink:

its easier than doing whats suggested.

Ive learned a lot since then. Go into the program data folder and rename “samba settings”. It’ll then open a default samba which you can go into and change the database settings

If you want to revert back just change the samba settings file back again

1 Like

just tried that but that still gives me same error only difference it gives the error in the systems language instead of selected one :sweat_smile:

there was another issue before I had like this, i reinstalled samba and it worked again

You have an invalid connection string probably caused by unknowingly trying to change database or messing with connection string. That error basically means it cant find a database to connect to. Typically its caused by installing SambaPOS into LocalDB and then trying to change it.

1 Like

uninstalled it 4times now even went trough program files manually to make sure every file relating to sambapos is deleted before reinstalling but still same error

Uninstalling will do nothing for database. You have to fix the connection string and point it to a valid database and instance.

Ok so you also deleted the Documents/SambaPOS folder and the ProgramData/SambaPOS folder? Second one is hidden so you need to enable hidden folders view to see it. Your connection string is located in programdata/sambapos folder.

1 Like

go into services and check the database is running


You can find log.txt file under mydocuments\sambapos5 folder.

think this needs splitting as its a separate issue?

so found the logfile

[General Info]

Application: SambaPOS
Version:     5.1.62
Region:      nl-NL
DB:          SQ
Machine:     OSCAR-PC
User:        Oscar
Date:        18/03/2017
Time:        00:04

User Explanation:

Oscar said ""

[Exception Info 1]

Top-level Exception
Type:        System.Data.SqlClient.SqlException
Message:     Cannot create file 'C:\Users\Oscar\SambaPOS5.mdf' because it already exists. Change the file path or the file name, and retry the operation.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Source:      .Net SqlClient Data Provider
Stack Trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass1a.<CreateDatabaseFromScript>b__19(DbConnection conn)
   at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass33.<UsingConnection>b__32()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
   at System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act)
   at System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act)
   at System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript)
   at System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
   at System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
   at System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase()
   at System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection)
   at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
   at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
   at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext)
   at System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState)
   at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState)
   at Samba.Persistance.Data.Initializer.Create(CommonDbContext context)
   at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
   at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
   at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
   at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
   at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
   at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
   at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
   at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
   at Samba.Infrastructure.Data.SqlData.EFWorkspace..ctor(CommonDbContext context)
   at Samba.Persistance.Data.WorkspaceFactory.Create()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.get_Workspace()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.ShouldCreateData()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.CreateData()
   at Samba.Presentation.Bootstrapper.InitializeShell()


[Assembly Info]

mscorlib, Version=
PresentationFramework, Version=
PresentationCore, Version=
System, Version=
WindowsBase, Version=
Samba.Services, Version=
System.ComponentModel.Composition, Version=
System.Configuration, Version=
System.Xaml, Version=
Microsoft.Practices.Prism.MefExtensions, Version=
Samba.Presentation.Services, Version=
Samba.Presentation.Common, Version=
Samba.Domain, Version=
Microsoft.Practices.Prism, Version=
System.Core, Version=
Samba.Infrastructure, Version=
DevExpress.Xpf.Core.v14.1, Version=
Microsoft.Practices.ServiceLocation, Version=
Samba.Localization, Version=
Samba.Persistance, Version=
FastButton, Version=


[System Info]

Operating System
-Microsoft Windows 7 Ultimate
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = 0
--FreePhysicalMemory = 1098060
--OSArchitecture = 32-bit
--OSLanguage = 1036
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

--Manufacturer = Hewlett-Packard
--Model = nc6xxxs
--TotalPhysicalMemory = 2138365952
--UserName = Oscar-PC\Oscar


######################### E N D #########################

will check that now thx

so deleted the Sambapos5.mdf file and it is fixed now thx for the help you guys


Do you have a working backup? If you have:

  1. move ‘C:\Users\Oscar\SambaPOS5.mdf’ & ‘C:\Users\Oscar\SambaPOS5_log.ldf’ files to somewhere else (don’t delete them)
  2. Restart SambaPOS to recreate the database. After sambapos starts you can restore your backup.
1 Like

ok will do that thx :slight_smile:

1 Like

Everytime I edit the connection string, it reverts once I restart Samba. Is there any alternative?
also, my log issue is different,

Please find log report below

[General Info]

Application: SambaPOS
Version: 5.1.62
Region: en
Date: 04/09/2017
Time: 11:21

User Explanation:


[Exception Info 1]

Top-level Exception
Type: System.Data.SqlClient.SqlException
Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
Source: .Net SqlClient Data Provider
Stack Trace: at System.Data.SqlClient.SqlInternalConnectionTds…ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory…

That error is just saying it can’t connect or find the SQL server.

In case anyone experiences this error, what worked for me:

  1. Open Run and Type in %AppData% then press enter
  2. Navigate to C:\Users\cfred\AppData\Local\Microsoft
  3. Then delete the Folder named Microsoft SQL Server Local DB
  4. Restart your PC then re-install LocalDB
  5. Open your SambaPOS
    Please NOTE: That this is only if your are using the LocalDB
1 Like