I open a database file and potentially create it if it does not exist.
But for some reason this does not create a table. Any ideas?
const char* sql = "CREATE TABLE IF NOT EXISTS blocks(id text primary_key,length numeric)"; sqlite3_stmt *stmt; rc = sqlite3_prepare_v2(db_, create_table_sql, -1, &stmt, NULL); rc = sqlite3_step(stmt);
I donβt have it, yes, I check the return code at every point. There are no errors.
Perhaps there is a better way to do this?
c ++ sqlite3
Matt
source share