Subject Re: [firebird-support] TIMESTAMP issues
Author Helen Borrie
At 05:09 AM 20/07/2007, you wrote:
>I read a bunch of posts on this group about the TIMESTAMP issue, and
>tried fixing my problem but with no success. Here is what I have.
>I have created a table called PEOPLE in my embedded firebirdsql database
>I am trying to add records to it using the following in C# .NET 2.0
>commandToDb = string.Concat("INSERT INTO ",
>conf.Configuration.databaseInfo.tableName, " VALUES
>('abc','xyz','07/19/2007 14:42:02.000')");
>FbCommand cmd = new FbCommand(commandToDb, dbConn);
> cmd.ExecuteNonQuery();
>I get the following error on the ExecuteNonQuery line
>"Dynamic SQL Error\r\nSQL error code = -104\r\nToken unknown - line 1,
>char 255\r\nNo"
>I get the feeling that I am not specifying the time right.

The time literal is fine. The error message is complaining about a
token "No" that is occurring in the statement at position 255 of line
1. Talking here about the statement that your .NET provider is
attempting to pass across the API. At a guess, I would say that you
have a table name having the string (blank + No) in it and you have
failed to do what is needed to ensure that this name passes across
the API enclosed in double quotes.

Subscribe to the firebird-net-provider forum and ask there how your
C# arguments are being resolved and, if needed, how the provider can
be made to accept quoted identifiers.