Subject Re: [firebird-support] Inserting a Date Value from Firebird
Author Alexandre Benson Smith
berniebialt wrote:

>Does anyone have an example of how to insert/update a date in
>My Code is as follows:
> FBConn = New FbConnection(dbstr)
> SQLString = "Insert into ""MstFile"" (""DOB"")_
> Values (#" & cmbDOB.Value & "#)"
> FBCmd = New FbCommand(SqlString, FBConn)
> FBCmd.Connection.Open()
> FBCmd.ExecuteNonQuery()
> FBConn.Close()
>I am receiving an error on the FBCmd Statement
>Thanks for the help.....

Could you send us what is in SQLString after it is concated with
cmbDOB.Value ?

FB accepts diferent date formats, I usually use yyyy-mm-dd

Or you could use prepared queries, don't know how to do it in your app

Justa tip: I assume that double quotes are for escaping a quote, avoid
using delimited identifiers if you can....

see you !


Alexandre Benson Smith
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil