Vinnie <thev...@yahoo.com> wrote:
> Unfortunately, this is all academic because I am using
> sqlite3_open16()! Where is the UTF-16 version that accepts the flags
> as a parameter? How can I achieve the same functionality?

You could convert your file name from UTF-16 to UTF-8, then call 
sqlite3_open_v2.

> How did this oversight happen? And what is the workaround? How can I
> tell, after a call to sqlite3_open16() if the database was created?
> The first thing I do when it opens is SELECT * FROM VERSION to see if
> I have to upgrade the database to a new version of my application
> data. I guess that call could fail and that would be my clue to
> create all the tables.

See PRAGMA user_version (http://sqlite.org/pragma.html#version) - it's 
designed specifically to do this sort of thing. A freshly created 
database will have user_version of 0. You would normally set it to some 
positive number (internally meaningful to your application - SQLite 
doesn't care) after creating your tables.

Igor Tandetnik 



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

Reply via email to