I would use the sqlite3_open_V2() call.  It won't read read the whole 
database, just enough to get started, including the header.  It will 
save you having to write and debug your own mechanism.

Tommy Ocel wrote:
> Hi,
>
> Other than using sqlite3_open_V2() with a SQLITE_OPEN_READONLY flag, which 
> would fully load the database and be time-consuming, anybody know of a quick 
> way to verify that a file is actually a SQLite3 database file?  (I'm reusing 
> a file extension for an upgrade, so want to quickly test if the file in new 
> SQL or old proprietary.)
>
> Thx for any feedback,
> Tommy
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to