RE: [sqlite] Binding a column name?

2005-07-11 Thread D. Richard Hipp
On Mon, 2005-07-11 at 10:32 -0700, Brown, Dave wrote: > Wait - what if AUTOVACUUM is set on the database, and I'm the only one doing > inserts/deletes? Will I still need to sqlite3_prepare() my statements again > if auto-vacuum is on? > AUTOVACUUM does *not* invalidate prepared statements -

RE: [sqlite] Binding a column name?

2005-07-11 Thread Tim McDaniel
> -Original Message- > From: D. Richard Hipp [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 10, 2005 6:01 PM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Binding a column name? > > On Sun, 2005-07-10 at 15:34 -0700, Tim McDaniel wrote: > > > >

RE: [sqlite] Binding a column name?

2005-07-11 Thread Brown, Dave
To: sqlite-users@sqlite.org Subject: RE: [sqlite] Binding a column name? On Sun, 2005-07-10 at 00:23 -0700, Brown, Dave wrote: > That is what I do. But that also means I have to call sqlite_prepare() > each time, instead of just once. I was originally hoping I could > prepare() once and

RE: [sqlite] Binding a column name?

2005-07-10 Thread D. Richard Hipp
On Sun, 2005-07-10 at 15:34 -0700, Tim McDaniel wrote: > > > > If another thread or process VACUUMs the database or creates > > a new table or makes any other structure changes to the > > database file, all of your prepared statements will be > > invalided and you will have to rerun

RE: [sqlite] Binding a column name?

2005-07-10 Thread Tim McDaniel
> -Original Message- > From: D. Richard Hipp [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 10, 2005 6:12 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Binding a column name? > > On Sun, 2005-07-10 at 00:23 -0700, Brown, Dave wrote: > > That is what

RE: [sqlite] Binding a column name?

2005-07-10 Thread Brown, Dave
Yes, actually I'm doing that already. Thanks! -Dave -Original Message- From: D. Richard Hipp [mailto:[EMAIL PROTECTED] Sent: Sunday, July 10, 2005 4:12 AM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Binding a column name? On Sun, 2005-07-10 at 00:23 -0700, Brown, Dave wrote

RE: [sqlite] Binding a column name?

2005-07-10 Thread D. Richard Hipp
On Sun, 2005-07-10 at 00:23 -0700, Brown, Dave wrote: > That is what I do. But that also means I have to call sqlite_prepare() each > time, instead of just once. I was originally hoping I could prepare() once > and just bind. > If another thread or process VACUUMs the database or creates a new

RE: [sqlite] Binding a column name?

2005-07-10 Thread Brown, Dave
-users@sqlite.org Subject: Re: [sqlite] Binding a column name? Hi, Why not construct the SQL statement dynamically in the C/C++ code? That way your statement(s) would have variable column names before compilation. Eugene Wee Brown, Dave wrote: > Actually I doubt it can - since without the column n

Re: [sqlite] Binding a column name?

2005-07-10 Thread Eugene Wee
Hi, Why not construct the SQL statement dynamically in the C/C++ code? That way your statement(s) would have variable column names before compilation. Eugene Wee Brown, Dave wrote: Actually I doubt it can - since without the column name it can't create the prepared statement byte code,

RE: [sqlite] Binding a column name?

2005-07-10 Thread Dan Kennedy
> Actually I doubt it can - since without the column name it can't create the > prepared statement byte code, right? Right. It can't be done. > > Is it possible for a bind variable to be a column name? I'd like to make a > query which is: > > select from MyTable; > > and I'd like the

RE: [sqlite] Binding a column name?

2005-07-09 Thread Brown, Dave
Actually I doubt it can - since without the column name it can't create the prepared statement byte code, right? -Dave -Original Message- From: Brown, Dave [mailto:[EMAIL PROTECTED] Sent: Saturday, July 09, 2005 8:46 PM To: sqlite-users@sqlite.org Subject: [sqlite] Binding a column