2009/7/20 Gary Verhaegen <kangary+sqli...@gmail.com>: > Hi everybody, . . . > I have narrowed the problem to the few following lines : > > > #define DEBUG > > int db_execute(sqlite3 *db, char stmt[STR_LEN]) { > DEBUG PRINT("\nentering db_execute with statement %s.", stmt); > int ret=0; > sqlite3_stmt *s; > int err = sqlite3_prepare_v2(db, stmt, -1,&s,0); > DEBUG if(err != SQLITE_OK) { > DEBUG PRINT("\nSQLite error %d.\n", err); > DEBUG PRINT(stmt); > DEBUG exit(err); > DEBUG } > if(sqlite3_step(s) == SQLITE_ROW)
no error checking here > ret = sqlite3_column_int(s,0); > sqlite3_finalize(s); . . . > So, am I doing something wrong with my db_execute wrapper ? Does > anyone know of such a bug as a statement that does not get executed > while the returned error code is SQLITE_OK ? As indicated inline, you are not handling error returns from sqlite3_step() > Should I step more than > one time through a DELETE or an UPDATE statement ? No > > Thanks in advance to anyone who took the time to read this, and my > apologies for my bad grammar - I am not a native English speaker. This may not be the whole story, but ensure that you are not getting an error returned. Regards, Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users