Cannot open database

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

Moderator: Renato

Post Reply
hugo
New 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 5175 times
Can't save.jpg
Can't save.jpg (29.39 KiB) Viewed 5175 times
Nikolay
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 5172 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 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 5165 times
Nikolay
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 5165 times
User avatar
Renato
MVP User
Posts: 669
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 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 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 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 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 5162 times
hugo
New 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 5156 times
User avatar
Renato
MVP User
Posts: 669
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Cannot open database

Post by Renato »

Hallo Hugo
Dank u wel voor de feedback. :idea:
Renato Forum Administrator
Nikolay
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 »

Excellent analysis of the case. Thanks for the info.
akoether
New User
Posts: 1
Joined: Fri May 29, 2020 12:52 pm
Are you a spam bot?: No

Re: Cannot open database

Post by akoether »

Thanks for this solution. I had the same issue and your solution worked for me also. :D
gregcap
Senior User
Posts: 21
Joined: Fri Sep 27, 2019 2:25 pm
Are you a spam bot?: No

Re: Cannot open database - win32bit

Post by gregcap »

I'm not sure my problem is the same of this tread.
I vaw using 32bit version 1.3.3 version on my windows 10 pc.
After I installed the 1.3.4 32bit version (Updates up to date) I get 2 problems:
1- whwn MMEX starts the top bar show the label "MMEX portable" (despite I'm sure that the dowloaded version is the rigth one)
2- I can only access the screen of recurring transaction, at the end the last database is not opened.
No error message, nor code occurs, I just wait for nothing ...

So I reverted back to 1.3.3, but the problem is the same.

The only solutions I can apply are:
- re-install each time the app and open the file (ok only first time)
- open the database files in explorer
I had to re-install each time windows was restarted.

Any help ?
Nikolay
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 »

wait 1.3.5 please
Post Reply