Re: [sqlite] INSERT multiple times using sqlite_bind_text()

2006-03-20 Thread Tito Ciuro
Perfect! It works fine now... :-) Many thanks, -- Tito On 20/03/2006, at 12:23, [EMAIL PROTECTED] wrote: Tito Ciuro <[EMAIL PROTECTED]> wrote: Hello, I'm trying to INSERT many records using sqlite3_bind_text(). This is what I do: // Finish... result = sqlite3_finalize(statement); What

Re: [sqlite] INSERT multiple times using sqlite_bind_text()

2006-03-20 Thread drh
Tito Ciuro <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to INSERT many records using sqlite3_bind_text(). This is > what I do: > > > // Finish... > result = sqlite3_finalize(statement); > > What am I missing? > Use sqlite3_reset() if you intent to reuse the statement.

[sqlite] INSERT multiple times using sqlite_bind_text()

2006-03-20 Thread Tito Ciuro
Hello, I'm trying to INSERT many records using sqlite3_bind_text(). This is what I do: sqlite3_stmt *statement = NULL; const char *sql = "INSERT INTO mytable(foo, bar) VALUES (?,?);" int result = sqlite3_prepare(sqliteDatabase, sql, -1, , NULL); // Do a bunch of binds and execute... for (i