Folks.

I had been struggling to implement ALTER TABLE ADD COLUMN in my app to change the database structure. However I would continuously face a locked database error.

After much experimentation I have come to a very very strange conclusion.

In my app if I do this:

-start app
-open database
-read version table
-close database
-CHECK VERSION, then if needed
-open database
-ALTER TABLE ADD COLUMN
-close database

it works FINE>

However if I do this:

-start app
-open database
-read version table
-close database
-CHECK VERSION, then if needed
*** WARN USER WITH ALERT ***   iErr = Alert(alertID, 0);
-open database
-ALTER TABLE ADD COLUMN
-close database

The ALTER TABLE ADD COLUMN stage FAILS with Database is locked.....

The only thing I can think is that the Alert function is accessing the Application's resource fork, which involves the OS opening the resource fork. Note that the SQLite database is NOT open at the time. it subsequently opens OK, but the ALTER TABLE ADD COLUMN fails.

Anyone have *any* idea what is happening ?

Cheers

mark
--
[EMAIL PROTECTED]
Tel: +44 208 340 5677
fax: +44 870 055 7790
http://www.gallery.co.uk


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to