On Mon, 22 May 2006, Igor Tandetnik wrote:

kamil <[EMAIL PROTECTED]> wrote:
How to check whether sqlite_open created the new database ?
I have to create a database schema in such case.

sqlite_master table would be empty in a freshly created database. [...]

Hello,

checking the sqlite_master table for the existence of tables and indices is a good and portable solution.

If you have a fairly recent version of SQLite3 you may also want to look at the CREATE [TABLE|INDEX] IF NOT EXISTS ... syntax.

cu,
Thomas

Reply via email to