Answer the question
In order to leave comments, you need to log in
Why is the database not being created?
Hello everyone, tell me, I'm trying to create a sqlite database, well, save something into it, but every time I get an SQLITE_CANTOPEN error. Same code on linux and everything works.
int ConnectDB(const char* dbname, sqlite3** db, int Parameters)
{
int res = sqlite3_open_v2(dbname, db, Parameters, 0);
return res;
}
bool SaveSettingsToDataBase(char* dbname, char* tablename, HotKey& key)
{
sqlite3 *db = 0;
//wchar_t *err;
if (SQLITE_OK != ConnectDB(dbname, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE))
return false;
CreateTable(db, tablename);
if (SQLITE_OK != addDataRow(db, tablename, key))
return false;
return true;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question