Can't open SambaPOS (Solved, Thanks to you ALL)

I want to have a fresh version of the program, so I deleted it and also deleted the SQL server and install it again then I got this

What shall I do, and what is the easiest way to get a fresh copy of the program.

Ok so lets go over a few things first so you dont make this mistake again in the future. SambaPOS is a database powered application and virtually all of the settings are stored in the database so deleting SambaPOS and installing it again will not change anything or start over fresh. All you need to do in the future is just start a new database and connect sambaPOS to it via a connection string or with MSSMS if using localdb.

Deleting SQL Server will also not help you much in fact it may cause issues like you have experienced.

SambaPOS stores some local settings in other locations and typically it does not get deleted when you uninstall specifically your Documents\SambaPOS folder.

Can you please navigate to your Documents\SambaPOS folder and open up the log.txt file and then copy and paste that log here so we can see what the actual error is?

Also can you answer if your using localdb or did you install Full SQL Express?

EDIT: You can try deleting your C:\ProgramData\SAMBAPOS\SambaPOS5\SambaSettings.txt file and restarting that may work but you will need to setup your database connection again. That folder is hidden so enable hidden folders to see it.

Thank you very much for your reply I will do so

I highly recommend installing Microsoft SQL Express 2016 and connecting SambaPOS to it. It is much easier and quicker to start a new fresh database when you are configuring and trying things out. Once you finish testing etc and are happy with the database you could activate the license key on it.

Example of how easy it is to switch to a fresh database coming upā€¦ Video posting shortlyā€¦

I am using Full SQL
and I tried deleting this file but no use

Which place you want from the log file or all of it

Just the last logā€¦ that should be the one we need.

[General Info]

Application: SambaPOS
Version: 5.1.60
Region: en
User: Ahmed Ibrahim
Date: 1/22/2017
Time: 6:44 PM

User Explanation:

Ahmed Ibrahim said ā€œā€

[Exception Info 1]

Top-level Exception
Type: System.Data.SqlClient.SqlException
Message: Cannot open database ā€œSambaPOS5ā€ requested by the login. The login failed.
Login failed for user ā€˜KOKOCHICKENPLUS\Ahmed Ibrahimā€™.
Source: .Net SqlClient Data Provider
Stack Trace: at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at FluentMigrator.Runner.Processors.GenericProcessorBase.EnsureConnectionIsOpen()
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.Exists(String template, Object[] args)
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.SchemaExists(String schemaName)
at FluentMigrator.Runner.VersionLoader.get_AlreadyCreatedVersionSchema()
at FluentMigrator.Runner.VersionLoader.LoadVersionInfo()
at FluentMigrator.Runner.VersionLoaderā€¦ctor(IMigrationRunner runner, Assembly assembly, IMigrationConventions conventions)
at FluentMigrator.Runner.MigrationRunnerā€¦ctor(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
at FluentMigrator.Runner.Initialization.TaskExecutor.Initialize()
at FluentMigrator.Runner.Initialization.TaskExecutor.Execute()
at Samba.Persistance.Data.Migrator.DoMigrate(String connectionString)
at Samba.Persistance.Data.Migrator.DoMigrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.Migrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf1.<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.RetryAction1.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.Persistance.Data.WorkspaceFactory.CreateReadOnly()
at Samba.Persistance.Data.Dao.CountT
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=
System.ComponentModel.Composition, Version=
System.Configuration, Version=
System.Xaml, Version=
Samba.Services, 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=
FastButton, Version=
Samba.Persistance, Version=

[System Info]

Operating System
-Microsoft Windows 10 Pro
ā€“CodeSet = 1252
ā€“CSDVersion =
ā€“CurrentTimeZone = 180
ā€“FreePhysicalMemory = 2327268
ā€“OSArchitecture = 64-bit
ā€“OSLanguage = 1033
ā€“ServicePackMajorVersion = 0
ā€“ServicePackMinorVersion = 0
ā€“Version = 10.0.14393

ā€“Manufacturer = Acer
ā€“Model = Aspire Z1-621
ā€“TotalPhysicalMemory = 4176936960
ā€“UserName = KOKOCHICKENPLUS\Ahmed Ibrahim

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

Here is example of how to reset to a fresh database for testing purposesā€¦ it keeps the other database in tact as wellā€¦ you can later delete the database if you have no use for it or switch between them.

Ok so it is what I expected. When you deleted SQL Express and reinstalled SambaPOS now can not log in. It is saying login failed for the user. Was that the same user that installed SQL Express? Is your password correct in your connection string?

I think I didi not change anything, may be the computer name was not like this in the first time

where can I find the password

So SambaPOS is trying to connect to database instance SambaPOS5 with username of KOKOCHICKENPLUS\Ahmed Ibrahim is that correct for your database when you reinstalled SQL?

If you changed computer name that likely is the issue.

yes, that was correct

I changed it may be from months a ago

Well your issue is that SambaPOS can not login to your database with the username provided. Are you logged into windows as that same user?

yes, I am longing to windows with the same user name

Ok so delete your C:\ProgramData\SAMBAPOS folder completely then try starting SambaPOS.

I made that before but I will try it with you

Delete the entire folder not just the contents.