Check the Log File in your SambaPOS5 folder in your documents.
Sounds like a Database issue.
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
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
just tried that but that still gives me same error only difference it gives the error in the systems language instead of selected one
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.
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.
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=4.0.0.0
PresentationFramework, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
System, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Services, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
Samba.Presentation.Common, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.13.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
FastButton, Version=1.0.0.0
-----------------------------
[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
Machine
-OSCAR-PC
--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:
ok will do that thx
Everytime I edit the connection string, it reverts once I restart Samba. Is there any alternative?
also, my log issue is different,
[General Info]
Application: SambaPOS
Version: 5.1.62
Region: en
DB: SQ
Machine: ROCKWELLSUITES
User: ROCKWELL SUITES
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:
You saved my life! I tried everything that was mentioned in the forum. This is the only way work well. Love you