Subject | Re: [IBO] IB_query default value property |
---|---|
Author | mdberezaga |
Post date | 2003-06-30T20:17:57Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
When I set IB_Query.GetServerDefaults, and default on database field
is CURRENT_DAY, IBO will get the date value on the server, that's
right?
Thanks.
> It is not a good idea to use the client-local (Delphi) datevariables for
> date/time stamping or for calculating derived values that are goingto be
> stored in the database. These variables in the client applicationwill
> record the date/time on the client machine, not the server. Thismakes the
> stamping unreliable in a mult-user environment.triggers
>
> The safe thing to do is to write Before Insert and Before Update
> on the table that is to get the timestamp. You still have accessto
> date/time variables, and they are local to the server. Here's anexample:
>Helen,
> CREATE TRIGGER TIMESTAMP_CUSTOMER FOR CUSTOMER
> ACTIVE BEFORE INSERT POSITION 0 AS
> [[[[ ACTIVE BEFORE UPDATE POSITION 0 AS ]]]]
> BEGIN
> NEW.DATE_STAMP = CURRENT_DATE;
> /* or, alternatively --- */
> [[[[ NEW.DATE_STAMP = CAST ('TODAY' AS DATE);]]]]
> END
>
> Helen
When I set IB_Query.GetServerDefaults, and default on database field
is CURRENT_DAY, IBO will get the date value on the server, that's
right?
Thanks.