version 1.56, 2013/06/03 19:01:31 |
version 1.57, 2013/06/03 22:51:14 |
Line 1933 dbopen(const char *base, int real) |
|
Line 1933 dbopen(const char *base, int real) |
|
|
|
rc = sqlite3_open_v2(file, &db, ofl, NULL); |
rc = sqlite3_open_v2(file, &db, ofl, NULL); |
if (SQLITE_OK == rc) |
if (SQLITE_OK == rc) |
return(1); |
goto prepare_statements; |
if (SQLITE_CANTOPEN != rc) { |
if (SQLITE_CANTOPEN != rc) { |
perror(file); |
perror(file); |
return(0); |
return(0); |
Line 1971 dbopen(const char *base, int real) |
|
Line 1971 dbopen(const char *base, int real) |
|
return(0); |
return(0); |
} |
} |
|
|
|
prepare_statements: |
|
SQL_EXEC("PRAGMA foreign_keys = ON"); |
sql = "DELETE FROM docs where file=?"; |
sql = "DELETE FROM docs where file=?"; |
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_DELETE], NULL); |
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_DELETE], NULL); |
sql = "INSERT INTO docs " |
sql = "INSERT INTO docs " |