I am using sqlite3_exec() to run a sql query on arm machine but I am getting error saying : "malformed database schema error : unrecognized token " ' " . sqlite version is : 3.6.17. here is the code snippet being used :
************** #include <stdlib.h> #include <sqlite3.h> #include <stdio.h> static int callback (void *NotUsed, void *NOTUsed, char *ch_strings_p2[4], char *ch_ColName_p2[4]) { printf ("\n\n START CALLBACK \n "); return 0; } int main () { sqlite3 *db; char *zErrMsg = 0; int rc; const char *command = "select * from sqlite_master"; rc = sqlite3_open ("Mydatabase.db", &db); if (rc) { printf (stderr, "Can't open database: %s\n", sqlite3_errmsg (db)); sqlite3_close (db); return -1; } rc = sqlite3_exec (db, command, (void * )callback, 0, &zErrMsg); printf("\n error code is=%d\n",rc); if (rc != SQLITE_OK) { printf (stderr, " SQL error: %s\n", zErrMsg); sqlite3_free (zErrMsg); return -1; } sqlite3_close (db); return 0; } The output on arm_v6 is ::: SQL error : malformed database schema error : unrecognized token " ' " error code = 4. callback function is not being called at all . The most surprising thing is while doing sql query through command line , it works properly . "PRAGMA integrity_check " succeeded on my Mydatabase.db . The same code works on x86 machine properly. Can anyone look into where is I am wrong here ?? Does sqlite3_exec is unstable on arm ? what token is being referred in output error ?? The error code returned is 4 that indicates SQL_ABORT error . -- View this message in context: http://www.nabble.com/sqlite3_exec-not-functioning-on-arm_v6-toolchain-tp25307287p25307287.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users