Subject Re: [IBO] tiboquery & sqltimestamps
Author Helen Borrie
At 10:52 PM 1/04/2003 +0000, you wrote:
> im running into an issue where i need to timestamp
>every row in a table & the timing needs to be precise down to the

First, timestamping is meaningless unless it is done on the server. Do
this by implement BeforeInsert and BeforeUpdate triggers on the tables

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

>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.