Subject Re: Inserting a Date Value from Firebird
Author berniebialt
I am trying to update the date from vb.net. The actual SQLString
value is:

"Insert into "MstrFile" ("DOB") Values (#10/7/1962#)"

--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
> berniebialt wrote:
>
> >Does anyone have an example of how to insert/update a date in
> >Firebird?
> >
> >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.....
> >
> >
> Bernie,
>
> 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
> language...
>
> Justa tip: I assume that double quotes are for escaping a quote,
avoid
> using delimited identifiers if you can....
>
> see you !
>
> --
>
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda.
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br