Re: [sqlite] Re: SQL statements in progress error message

2006-04-21 Thread Nicholas Bastin
On 4/20/06, Igor Tandetnik [EMAIL PROTECTED] wrote:
 Nicholas Bastin [EMAIL PROTECTED]
 wrote:
  When trying to commit a transaction, I'm getting the following error
  message from sqlite3_exec():
 
  cannot commit transaction - SQL statements in progress
 
  Is there any way to find out what statements are in progress?  Also,
  what could cause this?  I can guarantee that sqlite3_step has returned
  SQLITE_DONE on all my statements before I get to this point.  Is that
  not sufficient?

 No, it is not sufficient. You have to sqlite3_reset or sqlite3_finalize
 all statements in progress before you can commit.

Ok, thanks.  I'll make sure to reset all statements before trying to
commit the transaction.  (Is this mentioned somewhere in the
documentation?)

--
Nick


[sqlite] sqlite3_prepare with non-scalar variables?

2006-04-21 Thread Nicholas Bastin
Is there any way to effectively prepare the following statement:

SELECT * FROM some_table WHERE id IN (?);

where the contents of the variable are a vector? (1,3,5,9,34,57), etc.

I've been building up these just using text and using exec, but it
seems you'd want to have a sqlite3_bind_int64_vector or something
similaram I missing that this is implemented somewhere?

--
Nick