Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 19:02 -0400, Clay Dowling wrote: > James Berry wrote: > > > It would be useful to use bound parameters in such cases. > > > > Might it make sense to coerce the value at runtime into a string > > value in such a case? I believe a similar restriction (ticket #1096: > > limi

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Nuno Lucas
[16-04-2005 1:16, James Berry escreveu] I'm not the OP, but I'm simply suggesting that it would be, in general, really nice if the architecture could allow bound parameters for many more of these cases. Not to the point of keyword substitution (that would change meaning of a statement) but fo

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread James Berry
On Apr 15, 2005, at 4:02 PM, Clay Dowling wrote: James Berry wrote: It would be useful to use bound parameters in such cases. Might it make sense to coerce the value at runtime into a string value in such a case? I believe a similar restriction (ticket #1096: limit and offset) was recently li

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Clay Dowling
James Berry wrote: It would be useful to use bound parameters in such cases. Might it make sense to coerce the value at runtime into a string value in such a case? I believe a similar restriction (ticket #1096: limit and offset) was recently lifted to allow bound parameters in those cases, wh

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Darren Duncan
I believe that exactly the right circumstances to allow bound parameters is all of the same places where literal values are allowed, namely strings, numbers, nulls, etc. It does not make sense to have bound parameters in any other situation. -- Darren Duncan

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread James Berry
On Apr 15, 2005, at 4:16 PM, D. Richard Hipp wrote: On Fri, 2005-04-15 at 15:49 -0700, Cory Nelson wrote: It seems when a bind a string to "attach ? as dbname", it is never translated into the final statement. Is this supposed to happen? SQLite only allows bound parameters in places where it is le

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 15:49 -0700, Cory Nelson wrote: > It seems when a bind a string to "attach ? as dbname", it is never > translated into the final statement. Is this supposed to happen? > SQLite only allows bound parameters in places where it is legal to put an expression. Remember that bou