Cannot open database

MMEX4Desktop, incl. Windows, macOS (10.10 or newer), and Most Unix variants using the GTK+ toolkit

Moderator: Renato

hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Cannot open database

Post by hugo »

I installed the 1.3.4 64bit version on my windows 10 pc (Updates up to date). When the program starts it shows an error screen saying that it can't open the database. When I click OK all the data is there. However, when I want to add, delet or change a record, it can't save it, again giving a different database error. (See attachments)

Lately I had similar problems with 1.3.3 but by renaming the database files in explorer the engine worked. I had to rename each time windows was restarted.
So I reverted back to 1.3.3, at least that version keeps working despite the hassle of renaming the database each time.
Attachments
At startup.jpg
At startup.jpg (33.01 KiB) Viewed 5124 times
Can't save.jpg
Can't save.jpg (29.39 KiB) Viewed 5124 times
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Cannot open database

Post by Nikolay »

Seems something is wrong with DB stored info.

In the example below every INFOID field has unique index (1, 2, 3 etc)
In your examples INFOID has invalid value = -1;
Capture.PNG
Capture.PNG (13.96 KiB) Viewed 5121 times
Possible solution:
1. Install https://sqlitebrowser.org/
2. Copy your DB (.mmb file) to some folder.
3. Download https://sourceforge.net/projects/moneym ... p/download and extract to the same folder.
4. Run sqlitebrowser and open copy of your DB (.mmb file)
5. Delete INFOTABLE_V1 and close sqlitebrowser
6. Run mmex portable edition and open copy of your DB (.mmb file)
7. Select Base currency at startup and Voi la

But there may be a more complicated case.
hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Re: Cannot open database

Post by hugo »

Thanks for the quick answer. I got as far as what you see in the attachment..
Attachments
Error deleting table.jpg
Error deleting table.jpg (45.05 KiB) Viewed 5114 times
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Cannot open database

Post by Nikolay »

It looks as if the database contains data, but does not control it. Perhaps this data cannot be recovered.
The only hope is to find a backup of the database at the time when it was working.
To verify the data, you can make a request in this developer. In case if some line sappers... You can save this data with not simple manipulations.
checking.PNG
checking.PNG (56.47 KiB) Viewed 5114 times
User avatar
Renato
MVP MMEX User
Posts: 655
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Cannot open database

Post by Renato »

Renato Forum Administrator
hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Re: Cannot open database

Post by hugo »

Oh but the database is working fine if I rename it first in explorer and I use 1.3.3
All the entries are there and I can add records and modify them.
There might be something wrong with permissions although all files and folders have admin privileges and I run MMEX as admin.
I ran sfc /scannow and there were some errors in the system files but fixing them didn't help MMEX problems.
I ran chkdsk and the disk is fine.

Will try to get further into this as I like the updated features in 1.3.4

Thanks a lot so far.
hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Re: Cannot open database

Post by hugo »

Oh but the database is working fine if I rename it first in explorer and I use 1.3.3
All the entries are there and I can add records and modify them.
There might be something wrong with permissions although all files and folders have admin privileges and I run MMEX as admin.
I ran sfc /scannow and there were some errors in the system files but fixing them didn't help MMEX problems.
I ran chkdsk and the disk is fine.

Will try to get further into this as I like the updated features in 1.3.4

Thanks a lot so far.
hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Re: Cannot open database

Post by hugo »

Thanks Renato, I'll have a look into that. :)
hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Re: Cannot open database

Post by hugo »

Renato wrote: Sun Apr 26, 2020 3:59 pm maybe this could help: https://wordpress.semnaitik.com/repair-sqlite-database/

or : https://github.com/pawelsalawa/sqlitestudio/releases export the DB to HTML
I ran the PRAGMA integrity_check and the program returns "Integrity check: OK"
Attachments
PRAGMA integrity_check.jpg
PRAGMA integrity_check.jpg (29.51 KiB) Viewed 5111 times
hugo
New MMEX User
Posts: 7
Joined: Sun Apr 26, 2020 7:38 am
Are you a spam bot?: No

Re: Cannot open database

Post by hugo »

Upon installing the new 1.3.4 I got a Microsoft windows popup telling me the program was not safe to install.
Of course I ignored that and clicked 'Install anyway'
But in the deep catacombes of Windows Defender a setting was changed for the MMEX database files, blokking them for read and write.
Well sort off, because within MMEX I could still see all the data.

So I switched off 'Controlled folder access' in the virus settings of Windows Defender and now MMEX works like a charm.
Indeed, there were countless entries in the log file, all pointing to the location of my database files.

Thanks for all the support.
Attachments
ScreenHunter_187 Apr. 26 20.21.jpg
ScreenHunter_187 Apr. 26 20.21.jpg (49.09 KiB) Viewed 5105 times
Post Reply