Re: [sqlite] Is the file I'm about to open an SQLite Database

2017-09-04 Thread Papa
Yes, what I do to check for the existance of a database is: //This method will returns true if the table does not exit, false otherwise. bool SQLite3_RDB::notExist(const std::wstring& table) {     // SQL statement     sql_statement_request = "SELECT *  FROM " + table + " LIMIT 0";     // Feed

Re: [sqlite] Is the file I'm about to open an SQLite Database

2017-09-04 Thread Gwendal Roué
> Le 4 sept. 2017 à 16:46, Phoenix a écrit : > > Is there anyway to confirm the file I am about to open, via > sqlite3_open, is in fact an SQLite Database? You may have noticed that sqlite3_open doesn't fail if the file is not a database. To check if the file is a

Re: [sqlite] Is the file I'm about to open an SQLite Database

2017-09-04 Thread Simon Slavin
On 4 Sep 2017, at 3:46pm, Phoenix wrote: > Is there anyway to confirm the file I am about to open, via > sqlite3_open, is in fact an SQLite Database? Read the file header from it using fopen()/fread()/fclose() (i.e. not the SQLite library). The file will start

[sqlite] Is the file I'm about to open an SQLite Database

2017-09-04 Thread Phoenix
Is there anyway to confirm the file I am about to open, via sqlite3_open, is in fact an SQLite Database? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users