I'm working with sqlite3 for the first time, and cannot get it to properly check a file before it opens it. So far, sqlite always returns OK on any file.
Also, the file name is a variable returned from the GTK file chooser. It returns an absolute path, I'm guessing this is not a problem.
Thanks for any help.
This is a snippet of the code:
int rc;
char *filename;
sqlite3 *db;
filename = gtk_file_chooser_get_filename(etc.);
if(SQLITE_OK == rc = sqlite3_open(filename,&db))
{ etc. }
sqlite3_open doesn't actually read the file until the first non-pragma statement is prepared.
sqlite3_open_v2 provides other options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With