Subject Re: [IBO] tiboquery & sqltimestamps
Author petegajria
ok well in plain english then ;)

the data is on sqlserver & the timestamps are generated there
so the value for a datetime col for a row will be
2003-03-14 06:00:05.153

i get that data & am attempting to insert that into a table
on interbase using ibo

so theres no need for timestamps to be generated on the interbase
side.

the problem arises when im trying to put the above value
into a col in interbase (col defined as timestamp)
in tibo_query the field shows up as tdatetime at design time
if you try to put the above value into the col the msecs get
trunacated to 000 & trying to insert the value as assqltimestamp
doesnt work.

ive also tried using formatdatetime & other datetime functions
in delphi with no success.


the above should be a more clear now...
sorry about the confusion below :)

cheers

pete




--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 10:52 PM 1/04/2003 +0000, you wrote:
> >hi,
> > im running into an issue where i need to timestamp
> >every row in a table & the timing needs to be precise down to the
> >millisecond
>
> First, timestamping is meaningless unless it is done on the
server. Do
> this by implement BeforeInsert and BeforeUpdate triggers on the
tables
> involved.
>
> Second, in IB and existing release versions of Firebird, the
> timestamping context variable CURRENT_TIMESTAMP delivers .0000 for
the
> ten-thousandths of a second element of the stored timestamp. You
need to
> install and invoke the UDF GetExactTimestamp from the FBUDF library
to
> record a non-zero value for the sub-second element.
>
>
> >however when using tiboquery it doesnt seem to like
> >queryfield.assqltimestamp & runs into issues when i try
> >to insert/update data into the table
>
> Can't comment, since you don't indicate how you are trying to do it.
>
> >anyone else run into this & is there a workaround.
>
> Ditto, can't provide a workaround when we don't know what has to
be "worked
> around".
>
> >the field shows up as datetime when the fields are bound
> >at design time.
>
> To display the full timestamp, you need to set DisplayText. For
editing,
> you would need to set an EditMask; but I'm assuming that you would
make
> such a column read-only, so the issue of an EditMask doesn't arise.
>
> For the DisplayFormat, use some variety of elements involving dd
(day), mm
> (month), yyyy (year), hh (hours), nn (minutes), ss (seconds) and zz
> (milliseconds). Several varieties of each are available - see the
Delphi
> help for FormatDateTime.
>
> Helen