-
Jun 30th, 2020, 09:41 AM
#1
Thread Starter
Fanatic Member
sqlite: Database seems to be corrupted
Hello
I'm using SQLite as backend with VbrichClient.
Suddenly I'm getting this message on opening the application:cannot compile sql statement file is not a database.
Did anyone experience this issue?
Is there a way to solve the problem?
thank you
-
Jun 30th, 2020, 02:21 PM
#2
Re: sqlite: Database seems to be corrupted
Can you post the database file, or does it contain private information?
-
Jun 30th, 2020, 02:22 PM
#3
Re: sqlite: Database seems to be corrupted
Also - were you using a password for the database, and if so - are you sure you are still using the same password to open it?
-
Jun 30th, 2020, 02:37 PM
#4
Thread Starter
Fanatic Member
Re: sqlite: Database seems to be corrupted
Originally Posted by jpbro
Also - were you using a password for the database, and if so - are you sure you are still using the same password to open it?
thank you sir
yes it is the same password.
Please sir check your inbox. the file was sent in private message.
-
Jun 30th, 2020, 03:57 PM
#5
Re: sqlite: Database seems to be corrupted
I took a look at the file you sent - it appears to be an HTML document, not an SQLite database. When I open it up, it looks like a Google login page.
Just a hunch: does your app grab your database from Google Drive and store it locally? It looks like it may have failed due to requiring authentication and you saved the HTML file over top your database file.
-
Jun 30th, 2020, 04:59 PM
#6
Thread Starter
Fanatic Member
Re: sqlite: Database seems to be corrupted
Thank you sir
I took a look at the file you sent - it appears to be an HTML document, not an SQLite database. When I open it up, it looks like a Google login page.
But when I look at the file property, I has a "db" extension: SQLite database (.db)
does your app grab your database from Google Drive and store it locally?
No the database is at the application path.
thanks
-
Jun 30th, 2020, 05:12 PM
#7
Re: sqlite: Database seems to be corrupted
Originally Posted by Mustaphi
But when I look at the file property, I has a "db" extension: SQLite database (.db)
The extension of the file is completely irrelevant. If I have a bicycle and put a post-it note on it that says spaceship, that doesn't mean I can fly it to the moon.
If I create a text file that contains the text "This is a picture of a Palm Tree" and change the name to PalmTree.jpg, does that make it valid image file? Of course not.
Did you examine the contents of your db file in something like Notepad? If, as jbpro saw in your attachment, your local file is just a bunch of html, then your database file needs to be restored from backup because it has been overwritten, replaced, or significantly corrupted due to some sort of hard drive issue.
-
Jun 30th, 2020, 05:55 PM
#8
Thread Starter
Fanatic Member
Re: sqlite: Database seems to be corrupted
OptionBase1
thank you that clear
unfortunately there is no backup copy of the database file.
-
Jun 30th, 2020, 08:12 PM
#9
Re: sqlite: Database seems to be corrupted
I'm afraid it's really bad news if you don't have a backup. Unless Google is mangling the DB at the link you sent me, it clearly looks like Google HTML code for their login page:
Result in Notepad++:
Attachment 177740
Result in browser:
Attachment 177741
Perhaps a user accidentally saved over the database file with the HTML?
-
Jul 1st, 2020, 04:16 AM
#10
Thread Starter
Fanatic Member
Re: sqlite: Database seems to be corrupted
-
Jul 2nd, 2020, 07:10 AM
#11
Re: sqlite: Database seems to be corrupted
there is no backup copy of the database file
bad management?
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 6th, 2020, 09:03 AM
#12
Re: sqlite: Database seems to be corrupted
Here is how to attempt broker sqlite DB repair with their sqlite3.exe utility from command prompt
c:> echo .dump | sqlite3.exe my.db > dump.sql
c:> echo .quit | sqlite3.exe -init dump.sql my_repaired.db
cheers,
</wqw>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|