I am using SambaPOS 4, and my database files seem to be MDF and LDF filetypes. Is it possible to edit/modify the MDF file outside of SambaPOS and then have it work properly afterwards with SambaPOS?
Can someone recommend how to do this either in Linux or Windows?
Yes. Those are MS SQL database files. You can use SSMS to edit them, if they are mounted in a SQL Server Instance.
However, what you should be doing is a DB Backup, which creates a *.bak file that internally contains the mdf/ldf … then you restore the backup on another machine that is running SQL Server and use SSMS to edit the Database.
Thanks so much for the advice, and thanks for putting up with a complete database noob. I got the .bak file, and can view and edit in SSMS. This begs the next question:
Is it possible to run through a script to edit the database, re-save, then bring back into SambaPOS?
For example… Can I remove all the drinks from all the bills, then create a new database with the change? Then rerun another script on the same original database to remove all the food, then create a new database with the change? I would have 2 databases then. One for food, and one for drink, and then I would like to view in SambaPOS.
Another option I would like to do is to run a script that will increase / decrease prices for various items and then run some sales/profit numbers.
i am trying to evaluate buying a business and evaluating their sales data.
When I look at the SambaPOS log file, the connection string is empty, and everything is working ok.
If I open SSMS and attach the .mdf database, then detach the .mdf database, then try to open SambaPOS again, it will not load. I get the error: “Cannot open database “SambaPOS4” requested by the login. The login failed.”
It seems that just the act of attaching the database file to SSMS has altered something that conflicts with the SambaPOS connection string, login, or password.