On Sep 10, 2009, at 2:23 AM, gprand wrote:
> Program's output is:
> OPENX   16  /database_file.db 01002
> OPEN    16  /database_file.db
> READ    16    100       0 0
> SQL error: database disk image is malformed

This indicates that SQLite is reading the first 100 bytes of the  
database file (the database file header) and is either unable to read  
those 100 bytes or after looking at those bytes determines that the  
database file is malformed.

Possible causes:  (1) your file I/O subsystem is doing some kind of \n  
to \r\n translation.  (2) when you copied the database file onto the  
device, your copy utility corrupted the database file (again, possibly  
by \r to \r\n translation)  (3) your compiler somehow thinks that  
sizeof(char)!=1.

There might be other causes, but those are the ones that come to mind.

> CLOSE   16

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to