Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-14 Thread Dennis Cote
Joanne Pham wrote: > I have read one of the performance document and it stated that "prepared > statements must be generated inside transaction". Is that correct. > > So I have to do this: > begin transaction > prepared statement >.. > end transaction. > > I

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread John Stanton
> From: John Stanton > To: General Discussion of SQLite Database > Sent: Tuesday, May 12, 2009 12:09:09 PM > Subject: Re: [sqlite] Prepared statements must be generated inside your > transaction > > The confusion is in the names. When you "PREPARE" a statement yo

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Joanne Pham
In this case we don't need to bind the columns in the loop. Why this way didn't work for SQLite3 database. Thanks, JP From: John Stanton To: General Discussion of SQLite Database Sent: Tuesday, May 12, 2009 12:09:09 PM Subject: Re: [sqlite] Pr

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread John Stanton
The confusion is in the names. When you "PREPARE" a statement you actually compile the SQL. Compiling a program each time you run it is a waste of resources, and so is compiling the SQL each time you use it. Prepare your statements once and use them many times, binding data to the compiled co

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Pavel Ivanov
___ > From: Pavel Ivanov > To: General Discussion of SQLite Database > Sent: Tuesday, May 12, 2009 9:43:01 AM > Subject: Re: [sqlite] Prepared statements must be generated inside your > transaction > > I believe, these matters are very specific for each database server > (thoug

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Joanne Pham
: Tuesday, May 12, 2009 9:43:01 AM Subject: Re: [sqlite] Prepared statements must be generated inside your transaction I believe, these matters are very specific for each database server (though I can't recall server for which it's true what you say). What specific server is talked about in

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Pavel Ivanov
I believe, these matters are very specific for each database server (though I can't recall server for which it's true what you say). What specific server is talked about in this book? What's the name of this book? As long as SQLite is a concern, I prepare statements outside of transaction and then