Steve Palmer wrote:
Is there an easy way I can open a database via sqlite_open and then find out if sqlite has opened it in read-only mode without first needing to do any sort of modification and get an error code? I want to adjust the UI in my application to disable certain functionality if the database is read-only.

See Sqlite.h, near declaration of sqlite_open: ** The Truth: As currently implemented, all databases are opened ** for writing all the time. Maybe someday we will provide the ** ability to open a database readonly. The mode parameters is ** provide in anticipation of that enhancement.

IIRC, there have been comments saying that if the database is on read only media (eg: CD-ROM), then the database IS actually opened read only, this would require you to check the attributes of the DB file.
Regards
P.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to