I have some code that i'm having problems with. i open the database,
prepare, and the step through. During each step i'm trying to run a
seperate exec which is attempting to update a row. I keep getting a error
that says database is locked. I tried creating a additional open to just
use on the updates but i get the same error. Short example below with no
error checking.
sqlite3_open("my.db", &db);
sqlite3_prepare(db, "SELECT ip_address FROM ips WHERE ip_owner=''",
&plineInfo, 0);
while(sqlite3_prep(plineInfo) == SQLITE_ROW) {
zSQL = sqlite3_mprintf("UPDATE ips set ip_owner='%q' WHERE ip_owner=''
and ip_address='%q'", username, sqlite3_column_text(plineInfo, 0));
sqlite3_exec(db, zSQL, 0, 0, 0) == SQLITE_OK);
}
Agian this is just a quick/basic example showing what i'm trying to do. I
keep getting database is locked when checking the error returned by exec.
~Shaun
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users