Re: [sqlite] Re bind Statement

2009-07-05 Thread Dennis Cote
Indiff3rence wrote: > My question is: why is necessary to reset the statement before I can rebind > it? > It should work only if I clear the old bind, no? > > You need to reset the statement so that it can be executed again from the beginning (see section 3.0 of http://www.sqlite.org/cintro.ht

Re: [sqlite] Re bind Statement

2009-07-05 Thread Simon Slavin
On 5 Jul 2009, at 2:02pm, Indiff3rence wrote: > Using the v2 version of prepare didn't help. I'm not sure how can I > use > sqlite_exec and 'BEGIN TRANSACTION' / 'COMMIT'. Can you please > provide an > example where you insert multiple entries to a DB. Do the command 'BEGIN TRANSACTION'. Th

Re: [sqlite] Re bind Statement

2009-07-05 Thread Indiff3rence
Simon Slavin-2 wrote: > > Forget all the fancy ways to speed up individual INSERT commands. You > could probably just use sqlite_exec. Your speed problem is probably > that you're not specifying that they're all the same transaction. Do > a 'BEGIN TRANSACTION' before the first one and a

Re: [sqlite] Re bind Statement

2009-07-04 Thread Simon Slavin
On 5 Jul 2009, at 12:50am, Indiff3rence wrote: > I'm new to SQLite programming. I need to insert a great number of > entries to > a DB, but my implementation is slow. > I've done a function that prepares a statement and returns it, like > this: > > const char *zSql = "INSERT INTO codewords( i

[sqlite] Re bind Statement

2009-07-04 Thread Indiff3rence
Hello, I'm new to SQLite programming. I need to insert a great number of entries to a DB, but my implementation is slow. I've done a function that prepares a statement and returns it, like this: const char *zSql = "INSERT INTO codewords( id, degree, seed, buffer ) VALUES( ?, ?, ?, ? )"; sqlite3