Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-28 Thread Dennis Cote
On 7/27/06, Peter van Dijk <[EMAIL PROTECTED]> wrote: Using double quotes to quote identifiers in sqlite is dangerous, as mistyping a fieldname will not yield an error. Currently the only safe way to quote identifiers is using backticks, as in MySQL. Sadly you are almost correct. :-(

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-27 Thread Peter van Dijk
On Jul 26, 2006, at 5:33 PM, Dennis Cote wrote: John Newby wrote: Is there any other names I need to look out for other than the "sqlite_" and "table" that SQLite doesn't like as being a table name that anyone knows of? John, All keywords need to be quoted to use them as identifiers.

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Newby
Hi Richard, I noticed 'ADD' and 'COLUMN' aren't allowed but aren't on the list but I haven't came accross any others at the moment. I have taken your advice and am now putting all identifiers between double quotes. Many thanks for your help John On 26/07/06, [EMAIL PROTECTED] <[EMAIL

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > John Newby wrote: > > > > Is there any other names I need to look out for other than the > > "sqlite_" and > > "table" that SQLite doesn't like as being a table name that anyone > > knows of? > > > John, > > All keywords need to be quoted to use them as

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Newby
Hi Dennis, thanks for this, I've just spent the last 30 mins typing in every word I could think of that might have come up with a conflict, it was nowhere near as big as the list in the link. Thanks for the tips. John On 26/07/06, Dennis Cote <[EMAIL PROTECTED]> wrote: John Newby wrote: > >

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread Dennis Cote
John Newby wrote: Is there any other names I need to look out for other than the "sqlite_" and "table" that SQLite doesn't like as being a table name that anyone knows of? John, All keywords need to be quoted to use them as identifiers. There is a comprehensive list of keywords at

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Stanton
John Newby wrote: Hi, I've took the following quote from the SQLite website stating that "Tables names that begin with "*sqlite_*" are reserved for use by the engine" and if you try to create a table beginning with this it lets you know about it, but what about tables called "TABLE", this

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Newby
Hi Jonathan, yes you are right, thanks for this, I'll just put a check for them all as you never know what a user is going to do its better to try and fix it beforehand. thanks again John On 26/07/06, Jonathan Ballet <[EMAIL PROTECTED]> wrote: John Newby wrote: > Hi Jonathan, Derrel, thanks

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread Jonathan Ballet
John Newby wrote: > Hi Jonathan, Derrel, thanks for the info. > > I just wanted to know as I am creating an application that interacts with > the SQLite.dll and if a user was to try to create a table beginning with > "sqlite_" the user would get the very detailed erro message, but if for > some >

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Newby
Hi Jonathan, Derrel, thanks for the info. I just wanted to know as I am creating an application that interacts with the SQLite.dll and if a user was to try to create a table beginning with "sqlite_" the user would get the very detailed erro message, but if for some reason the user wanted to call

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread Derrell . Lipman
"John Newby" <[EMAIL PROTECTED]> writes: > Does anyone know any reason why SQLite doesnt like tables called "Table" or > is this a standard SQL thing? It's a reserved word, so if you really, Really, REALLY want to create a table of that name (you're making it confusing to read, so you really

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread Jonathan Ballet
John Newby wrote: > Does anyone know any reason why SQLite doesnt like tables called "Table" or > is this a standard SQL thing? > > Many thanks > > John > I guess that 'Table' is a reserved keyword, part of the SQL language. If you _really_ want to have a table, named 'table', you should put

[sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Newby
Hi, I've took the following quote from the SQLite website stating that "Tables names that begin with "*sqlite_*" are reserved for use by the engine" and if you try to create a table beginning with this it lets you know about it, but what about tables called "TABLE", this throws back an error