Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Simon Slavin
On 26 Aug 2010, at 8:29pm, Alan Chandler wrote: > On 26/08/10 17:38, Simon Slavin wrote: > >> So someone can check it out. Try it with a VIEW that definitely doesn't >> exist, or use >> >> CREATE VIEW IF NOT EXISTS ... >> > > As far as I can work it out, the statement then prepares OK - but

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 20:29, Alan Chandler wrote: > On 26/08/10 17:38, Simon Slavin wrote: > >> So someone can check it out. Try it with a VIEW that definitely doesn't >> exist, or use >> >> CREATE VIEW IF NOT EXISTS ... >> > > As far as I can work it out, the statement then prepares OK - but seems > then

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 17:38, Simon Slavin wrote: > So someone can check it out. Try it with a VIEW that definitely doesn't > exist, or use > > CREATE VIEW IF NOT EXISTS ... > As far as I can work it out, the statement then prepares OK - but seems then to execute as a no op. Since having completed that

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Simon Slavin
On 26 Aug 2010, at 4:59pm, Igor Tandetnik wrote: > Jay A. Kreibich wrote: >> On Thu, Aug 26, 2010 at 04:32:11PM +0100, Simon Slavin scratched on the wall: >>> >>> On 26 Aug 2010, at 3:36pm, Alan Chandler wrote: >>> On 26/08/10 13:38, Simon Slavin wrote: >>> >>> So you are trying to creat

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Jay A. Kreibich
On Thu, Aug 26, 2010 at 11:59:03AM -0400, Igor Tandetnik scratched on the wall: > Jay A. Kreibich wrote: > >> So you are trying to create a VIEW which does already exist. In that > >> case, there's no mystery about why you're getting an error message. > > > > No, he's trying the *PREPARE* a CR

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Igor Tandetnik
Jay A. Kreibich wrote: > On Thu, Aug 26, 2010 at 04:32:11PM +0100, Simon Slavin scratched on the wall: >> >> On 26 Aug 2010, at 3:36pm, Alan Chandler wrote: >> >>> On 26/08/10 13:38, Simon Slavin wrote: On 26 Aug 2010, at 12:12pm, Alan Chandler wrote: > This time it reported

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Jay A. Kreibich
On Thu, Aug 26, 2010 at 04:32:11PM +0100, Simon Slavin scratched on the wall: > > On 26 Aug 2010, at 3:36pm, Alan Chandler wrote: > > > On 26/08/10 13:38, Simon Slavin wrote: > >> > >> On 26 Aug 2010, at 12:12pm, Alan Chandler wrote: > >> > >>> This time it reported that the view it would have

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Pavel Ivanov
>>> I'm sorry to ask this, but can you check for us whether a VIEW by that name >>> really does exist ?  Don't forget, VIEWs get saved in the file, they're not >>> part of the attachment. >> >> Yes it does > > So you are trying to create a VIEW which does already exist.  In that case, > there's

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Simon Slavin
On 26 Aug 2010, at 3:36pm, Alan Chandler wrote: > On 26/08/10 13:38, Simon Slavin wrote: >> >> On 26 Aug 2010, at 12:12pm, Alan Chandler wrote: >> >>> This time it reported that the view it would have created failed because >>> the table (view) already existed. >> >> I'm sorry to ask this, but

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 13:38, Simon Slavin wrote: > > On 26 Aug 2010, at 12:12pm, Alan Chandler wrote: > >> This time it reported that the view it would have created failed because >> the table (view) already existed. > > I'm sorry to ask this, but can you check for us whether a VIEW by that name > really do

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 12:20, Pavel Ivanov wrote: > Yes, "validation" happens only at the time of execution. So you are > apparently doing something wrong and you better show your code. > easiest is to provide links to a copy. I've added a .txt extension to all the files to stop them being executed by the

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Drake Wilson
Quoth Simon Slavin , on 2010-08-26 13:38:36 +0100: > I'm sorry to ask this, but can you check for us whether a VIEW by > that name really does exist ? Don't forget, VIEWs get saved in the > file, they're not part of the attachment. And to add to that: if you want them to merely be attached to the

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Simon Slavin
On 26 Aug 2010, at 12:12pm, Alan Chandler wrote: > This time it reported that the view it would have created failed because > the table (view) already existed. I'm sorry to ask this, but can you check for us whether a VIEW by that name really does exist ? Don't forget, VIEWs get saved in the

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Pavel Ivanov
> In my code, I delete the view before attempting to recreate it by > executing the prepared statement.  Isn't that the time to validate > whether there are semantic problems with the statement? Yes, "validation" happens only at the time of execution. So you are apparently doing something wrong an

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 10:22, Alan Chandler wrote: > I am using PHP PDO to access sqlite and have reached a peculiar error > situation. Basically its saying I can't have parameters in a CREATE > VIEW sql statement when I am preparing it. The plot thickens I replaced all the parameter placeholders with a qu

[sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
I am using PHP PDO to access sqlite and have reached a peculiar error situation. Basically its saying I can't have parameters in a CREATE VIEW sql statement when I am preparing it. I can't find any reference to this restriction or the error message in the SQLite documentation, so I am wonderin