-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Description
Hello, i don't find why PRAGMA don't work. I try:
const char* data = "Output:";
static int callback(void *data, int argc, char **argv, char **azColName) {
for (int i = 0; i<argc; i++) {
if (i)
Serial.print((char) '\t');
Serial.printf("%s", argv[i] ? argv[i] : "NULL");
}
Serial.printf("\n");
return 0;
}
void test()
{
// Open database
std::string dbSQL = "PRAGMA pragma_list;";
int rc = sqlite3_exec(dbFile, dbSQL.c_str(), callback, (void*)data, &dbErrMsg);
if (rc != SQLITE_OK) {
Serial.print(F("SQL error: "));
Serial.print(sqlite3_extended_errcode(dbFile));
Serial.print(" ");
Serial.println(dbErrMsg);
sqlite3_free(dbErrMsg);
}
i get empty result, same code with "select * from settings" get my table.
I want use "PRAGMA integrity_check" for restore backup at start if error found.
Thanks for the help.
Metadata
Metadata
Assignees
Labels
No labels