Christiane Lemke <[EMAIL PROTECTED]> wrote: > Hello, > > I try to update a row of a Sqlite3 Database with the c++ api using the > following lines of code: > > char dbquery[1024]; > int rc; > sprintf(dbquery, "update zeit_tabelle set zeit = %d where username like > '%s';", 12345, test); > rc = sqlite3_exec(db, dbquery, 0, 0, 0);
Aside: Consider using sqlite3_mprintf with the %Q or %q format strings to avoid the possibility of buffer overruns and/or SQL injection attacks. > > The returned rc is 14, that means SQLITE_CANTOPEN according to the > documentation. Reading the database with "select" querys works perfectly > though. Are you *sure* the database is an SQLite3 database and not an SQLite2 database? -- D. Richard Hipp <[EMAIL PROTECTED]>