Subject | Re: [IBO] DateTime and IBOQuery |
---|---|
Author | Stephen Lee-Woolf |
Post date | 2002-04-30T08:23:27Z |
Jason
I hear what you're saying BUT .. I followed Helen's suggestion and
modified the format of the IB_Constants.pas file to
DT_DateFormat = 'yyyy"-"MM"-"dd';
And and ran some tests this morning with a fresh Delphi project
containing 1 IBODatabase and 1 IBOQuery doing simple inserts into Date
and Timestamp fields on a test database.
I found that Firebird would accept and correctly interpret the date
element of either field type in either yyyy-MM-dd or MM/dd/yyyy formats.
The time element was correctly stored whichever date format I used.
Returning to my original application and doing a full re-build, I found
that dates entered on the same client machine attaching to the same
server continue to generate an error claiming that '2002-04-27
23:26:49' is not a valid Date/Time value. Plugging this same value into
my test program resulted in a correct data insertion into the table.
My application, which was originally written to transfer .csv log files
into a MySQL database worked fine. The log files produce dat/time
information in the form yyyymmdd hh:nn:ss which is translated by my
application into a standard date/time format. The value quoted in the
error message proves that the app IS correctly translating the values
I'm sorry, but I really don't understand what is happening here.
Steve
In article <017801c1ef9d$8ccb1d30$dc756a41@CX170673E>,
jwharton@... says...
Steve Lee-Woolf
University of Salford
Manchester, U.K.
I hear what you're saying BUT .. I followed Helen's suggestion and
modified the format of the IB_Constants.pas file to
DT_DateFormat = 'yyyy"-"MM"-"dd';
And and ran some tests this morning with a fresh Delphi project
containing 1 IBODatabase and 1 IBOQuery doing simple inserts into Date
and Timestamp fields on a test database.
I found that Firebird would accept and correctly interpret the date
element of either field type in either yyyy-MM-dd or MM/dd/yyyy formats.
The time element was correctly stored whichever date format I used.
Returning to my original application and doing a full re-build, I found
that dates entered on the same client machine attaching to the same
server continue to generate an error claiming that '2002-04-27
23:26:49' is not a valid Date/Time value. Plugging this same value into
my test program resulted in a correct data insertion into the table.
My application, which was originally written to transfer .csv log files
into a MySQL database worked fine. The log files produce dat/time
information in the form yyyymmdd hh:nn:ss which is translated by my
application into a standard date/time format. The value quoted in the
error message proves that the app IS correctly translating the values
I'm sorry, but I really don't understand what is happening here.
Steve
In article <017801c1ef9d$8ccb1d30$dc756a41@CX170673E>,
jwharton@... says...
> Your server has fixed date formats it recognizes. Your client is locale--
> specific and respects your local settings only.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Stephen Lee-Woolf" <s.lee-woolf@...>
> Newsgroups: egroups.ibobjects
> To: <IBObjects@yahoogroups.com>
> Sent: Monday, April 29, 2002 7:03 AM
> Subject: Re: [IBO] DateTime and IBOQuery
>
>
> > Helen
> >
> > I've upgraded to IBO 4.2.Ha. I modified the IB_constants.pas file as you
> > suggested and then performed the installation.
> >
> > On re-compiling my code I still get exactly the same error message as
> > before - the DateTIme format simply isn't being recognised by IBO.
> >
> > Anything else I can try?
> >
> > Steve
> >
> > In article <5.1.0.14.0.20020425231937.081d42f0@...>,
> > helebor@... says...
> > > At 02:04 PM 25-04-02 +0100, Steve Lee-Woolf wrote:
> > > >Perhaps someone can point me in the right direction here. I am using an
> > > >app written in Delphi 6 with IBO to access a FireBird 1.0 database and
> > > >am having trouble with datetime fields.
> > > >
> > > >If I use an external SQL tool to insert data into a DateTime field
> using
> > > >the SQL statement:
> > > >
> > > >insert into table1 (test1) values ('2002-04-23 23:15:21') - where
> > > >test1 is a DateTime field
> > > >
> > > >there is no problem, the data is correctly inserted.
> > >
> > > Yes, because you have used a date literal representing a date format
> which
> > > Firebird recognises.
> > >
> > > >BUT if I use the
> > > >same statement in an IBOQuery *albeit as a paramaterised query with the
Steve Lee-Woolf
University of Salford
Manchester, U.K.