Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Server timestamp

7 posts in Trigger Last posting was on 2004-07-29 10:58:53.0Z
Francois Posted on 2004-07-22 08:54:35.0Z
Reply-To: "francois" <francois@geedee.com.au>
From: "francois" <francois@geedee.com.au>
Newsgroups: Advantage.Trigger
Subject: Server timestamp
Date: Thu, 22 Jul 2004 16:54:35 +0800
Lines: 17
Organization: geedee
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 202.72.180.220
Message-ID: <40ff821a@solutions.advantagedatabase.com>
X-Trace: 22 Jul 2004 03:00:10 -0700, 202.72.180.220
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!202.72.180.220
Xref: solutions.advantagedatabase.com Advantage.Trigger:87
Article PK: 1136155

Hi

I need a way to stamp every entry in my transaction table with the current
date and time.
a) is there a way to force all workstations to use the ADS server's time to
stamp a transaction? (Workstation clocks are not always in sync - within 20s
is good enough - or is there a way to enforce that?)
b) I saw someone writing that now() as the default value for a field will
automatically stamp it with the date & time upon creation of the record.
However, even if this works it will not refresh when the record is edited.

Any advice will be appreciated.

TIA
Francois


"Thomas Steinmaurer" <t.steinmaurer Posted on 2004-07-22 10:31:26.0Z
From: "Thomas Steinmaurer" <t.steinmaurer@_no_upscene_spam_.com>
Newsgroups: Advantage.Trigger
References: <40ff821a@solutions.advantagedatabase.com>
Subject: Re: Server timestamp
Date: Thu, 22 Jul 2004 12:31:26 +0200
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 140.78.93.2
Message-ID: <40ff997f@solutions.advantagedatabase.com>
X-Trace: 22 Jul 2004 04:39:59 -0700, 140.78.93.2
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!140.78.93.2
Xref: solutions.advantagedatabase.com Advantage.Trigger:88
Article PK: 1136154


> I need a way to stamp every entry in my transaction table with the current
> date and time.
> a) is there a way to force all workstations to use the ADS server's time
to
> stamp a transaction? (Workstation clocks are not always in sync - within
20s
> is good enough - or is there a way to enforce that?)

NOW() used in a trigger will return the servers date/time.


> b) I saw someone writing that now() as the default value for a field will
> automatically stamp it with the date & time upon creation of the record.
> However, even if this works it will not refresh when the record is edited.

Right.

You'll have to use an UPDATE trigger for that. A default value applies
only for a newly inserted record.



Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com


Francois Posted on 2004-07-23 09:59:08.0Z
Reply-To: "francois" <francois@geedee.com.au>
From: "francois" <francois@geedee.com.au>
Newsgroups: Advantage.Trigger
References: <40ff821a@solutions.advantagedatabase.com> <40ff997f@solutions.advantagedatabase.com>
Subject: Re: Server timestamp
Date: Fri, 23 Jul 2004 17:59:08 +0800
Lines: 38
Organization: geedee
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 202.72.180.220
Message-ID: <4100e296@solutions.advantagedatabase.com>
X-Trace: 23 Jul 2004 04:04:06 -0700, 202.72.180.220
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!202.72.180.220
Xref: solutions.advantagedatabase.com Advantage.Trigger:90
Article PK: 1136158

Thanks Thomas

"Thomas Steinmaurer" <t.steinmaurer@_no_upscene_spam_.com> wrote in message
news:40ff997f@solutions.advantagedatabase.com...
> > I need a way to stamp every entry in my transaction table with the
current
> > date and time.
> > a) is there a way to force all workstations to use the ADS server's time
> to
> > stamp a transaction? (Workstation clocks are not always in sync - within
> 20s
> > is good enough - or is there a way to enforce that?)
>
> NOW() used in a trigger will return the servers date/time.
>
>
> > b) I saw someone writing that now() as the default value for a field
will
> > automatically stamp it with the date & time upon creation of the record.
> > However, even if this works it will not refresh when the record is
edited.
>
> Right.
>
> You'll have to use an UPDATE trigger for that. A default value applies
> only for a newly inserted record.
>
>
>
> Best Regards,
> Thomas Steinmaurer
> LogManager Series - Logging/Auditing Suites supporting
> InterBase, Firebird, Advantage Database and MS SQL Server
> Upscene Productions
> http://www.upscene.com
>
>


Brad Schmidt Posted on 2004-07-22 19:18:02.0Z
From: Brad Schmidt <brad.schmidt.nospam@extendedsystems.com>
Newsgroups: Advantage.Trigger
Subject: Re: Server timestamp
Date: Thu, 22 Jul 2004 13:18:02 -0600
Message-ID: <MPG.1b69c0d5865433c798975e@solutions.AdvantageDatabase.com>
References: <40ff821a@solutions.advantagedatabase.com>
Organization: ESI
X-Newsreader: MicroPlanet Gravity v2.50
NNTP-Posting-Host: 198.102.102.88
X-Trace: 22 Jul 2004 13:26:43 -0700, 198.102.102.88
Lines: 27
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.88
Xref: solutions.advantagedatabase.com Advantage.Trigger:89
Article PK: 1136156

In addition to what Thomas said in his reply, if you decided you didn't
want to do this in a trigger, and you wanted to know the server's time
in your client application, you can use the AdsGetServerTime API to
retrieve that info.

In article <40ff821a@solutions.advantagedatabase.com>,
francois@geedee.com.au says...

> Hi
>
> I need a way to stamp every entry in my transaction table with the current
> date and time.
> a) is there a way to force all workstations to use the ADS server's time to
> stamp a transaction? (Workstation clocks are not always in sync - within 20s
> is good enough - or is there a way to enforce that?)
> b) I saw someone writing that now() as the default value for a field will
> automatically stamp it with the date & time upon creation of the record.
> However, even if this works it will not refresh when the record is edited.
>
> Any advice will be appreciated.
>
> TIA
> Francois

Brad
--
* Brad Schmidt
* Extended Systems, Inc


Francois Posted on 2004-07-23 09:59:30.0Z
Reply-To: "francois" <francois@geedee.com.au>
From: "francois" <francois@geedee.com.au>
Newsgroups: Advantage.Trigger
References: <40ff821a@solutions.advantagedatabase.com> <MPG.1b69c0d5865433c798975e@solutions.AdvantageDatabase.com>
Subject: Re: Server timestamp
Date: Fri, 23 Jul 2004 17:59:30 +0800
Lines: 37
Organization: geedee
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 202.72.180.220
Message-ID: <4100e2ad@solutions.advantagedatabase.com>
X-Trace: 23 Jul 2004 04:04:29 -0700, 202.72.180.220
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!202.72.180.220
Xref: solutions.advantagedatabase.com Advantage.Trigger:91
Article PK: 1136160

Thanks Brad

"Brad Schmidt" <brad.schmidt.nospam@extendedsystems.com> wrote in message
news:MPG.1b69c0d5865433c798975e@solutions.AdvantageDatabase.com...
> In addition to what Thomas said in his reply, if you decided you didn't
> want to do this in a trigger, and you wanted to know the server's time
> in your client application, you can use the AdsGetServerTime API to
> retrieve that info.
>
> In article <40ff821a@solutions.advantagedatabase.com>,
> francois@geedee.com.au says...
> > Hi
> >
> > I need a way to stamp every entry in my transaction table with the
current
> > date and time.
> > a) is there a way to force all workstations to use the ADS server's time
to
> > stamp a transaction? (Workstation clocks are not always in sync - within
20s
> > is good enough - or is there a way to enforce that?)
> > b) I saw someone writing that now() as the default value for a field
will
> > automatically stamp it with the date & time upon creation of the record.
> > However, even if this works it will not refresh when the record is
edited.
> >
> > Any advice will be appreciated.
> >
> > TIA
> > Francois
>
> Brad
> --
> * Brad Schmidt
> * Extended Systems, Inc


oranier Posted on 2004-07-28 08:37:24.0Z
Reply-To: "oranier" <info@oranier.com>
From: "oranier" <info@oranier.com>
Newsgroups: Advantage.Trigger
References: <40ff821a@solutions.advantagedatabase.com>
Subject: Re: Server timestamp
Date: Wed, 28 Jul 2004 10:37:24 +0200
Lines: 31
Organization: oranier
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 217.247.196.29
Message-ID: <410766f0@solutions.advantagedatabase.com>
X-Trace: 28 Jul 2004 02:42:24 -0700, 217.247.196.29
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!217.247.196.29
Xref: solutions.advantagedatabase.com Advantage.Trigger:97
Article PK: 1136163

Hi,

SELECT NOW()FROM System.IOTA


Matthias Schlegel


"francois" <francois@geedee.com.au> schrieb im Newsbeitrag
news:40ff821a@solutions.advantagedatabase.com...

> Hi
>
> I need a way to stamp every entry in my transaction table with the current
> date and time.
> a) is there a way to force all workstations to use the ADS server's time
to
> stamp a transaction? (Workstation clocks are not always in sync - within
20s
> is good enough - or is there a way to enforce that?)
> b) I saw someone writing that now() as the default value for a field will
> automatically stamp it with the date & time upon creation of the record.
> However, even if this works it will not refresh when the record is edited.
>
> Any advice will be appreciated.
>
> TIA
> Francois
>
>


francois Posted on 2004-07-29 10:58:53.0Z
Reply-To: "francois" <fransh_@westnet.com.au>
From: "francois" <fransh_@westnet.com.au>
Newsgroups: Advantage.Trigger
References: <40ff821a@solutions.advantagedatabase.com> <410766f0@solutions.advantagedatabase.com>
Subject: Re: Server timestamp
Date: Thu, 29 Jul 2004 18:58:53 +0800
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 202.72.164.126
Message-ID: <4108dbdf@solutions.advantagedatabase.com>
X-Trace: 29 Jul 2004 05:13:35 -0700, 202.72.164.126
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!202.72.164.126
Xref: solutions.advantagedatabase.com Advantage.Trigger:98
Article PK: 1136165

Thanks, I'll try that in the trigger.
Regards
Francois

"oranier" <info@oranier.com> wrote in message
news:410766f0@solutions.advantagedatabase.com...
> Hi,
>
> SELECT NOW()FROM System.IOTA
>
>
> Matthias Schlegel
>
>
> "francois" <francois@geedee.com.au> schrieb im Newsbeitrag
> news:40ff821a@solutions.advantagedatabase.com...
> > Hi
> >
> > I need a way to stamp every entry in my transaction table with the
current
> > date and time.
> > a) is there a way to force all workstations to use the ADS server's time
> to
> > stamp a transaction? (Workstation clocks are not always in sync - within
> 20s
> > is good enough - or is there a way to enforce that?)
> > b) I saw someone writing that now() as the default value for a field
will
> > automatically stamp it with the date & time upon creation of the record.
> > However, even if this works it will not refresh when the record is
edited.
> >
> > Any advice will be appreciated.
> >
> > TIA
> > Francois
> >
> >
>
>