PDA

View Full Version : sql Lite help! - "database disk image is malformed!"



cosmic
10-21-2005, 09:40 AM
I've exported a table from an access database into a delimted text and then imported into sql lite data browser and saved as a .db. The code i've used to open the database is as follows:

sDatabaseFile = _SourceFolder .. "\\AutoPlay\\Docs\\blah.db";
db = SQLite.Open(sDatabaseFile);
nLastError = Application.GetLastError();
if nLastError ~= SQLite.OK then
Dialog.Message("Error Opening File", SQLite.GetLastErrorString());
end

Upon preview/build I get the error "database disk image is malformed!"

Where did I go wrong?

Worm
10-21-2005, 09:43 AM
What version of the SQLite Browser did you use?

I had to drop back to an older version (1.1) to create databases that were compatible with the SQLite plugin.

cosmic
10-21-2005, 09:45 AM
Hey Worm...I'm using V 1.2.1. Do you know where I can download the older version?

Worm
10-21-2005, 09:59 AM
http://sourceforge.net/project/showfiles.php?group_id=87946

stickck
10-21-2005, 10:21 AM
i had the same problem as Worm. version 1.2.1 only make version 3 SQLite databases. i thought i was doing something wrong too. i messed with it for 4 hours!

Worm
10-21-2005, 10:30 AM
Sorry about that... It never even crossed my mind to post that you needed to get the older version.

cosmic
10-21-2005, 01:37 PM
Thanks very much for your help...It's reading the db now. I'm a bit of a rookie at this so I'm sure I'll be running into some other glitches.

cosmic
10-21-2005, 02:03 PM
am importing a table (.csv) that has about 20000 records into the sqlite browser but it seems to hang. Has anyone also had this problem...any suggestions?

Derek
10-21-2005, 04:03 PM
I did the same thing with about 7100 records and it seemed to hang.
At first it was fine, then it seemed to hang but it would appear to be doing something .. then eventually it was doing nothing. I figured it had lost it! :rolleyes
Cant remember how long I waited but i finally gave up and quit the program. On re-opening, all records had been imported which suggests the problem is more along the refresh stage not the importing.

cosmic
10-26-2005, 08:56 AM
I left it for a while and on reopening I had nothing. Are there any other ways of exporting Access tables into sqlite??

I know I can try splitting up the tables but I'd rather do that as a last resort.