You are absolutely right. But plus more, I want to insert a audit record into second
table when someone update a field in the primary table. I quite keen to use 'if update
(fieldname)' then do the audit thing.
Jim
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of [EMAIL PROTECTED]
Sent: Thursday, June 21, 2001 04:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [DUG]: [DUB-DB] trigger with parameter
Jim
As I understand it you are insertinging into one table and on that event
want to unsert anther value in
another table (in a log table with the user name in it for example)
Unless the data you wish to put in the table is available ,either as a field
in the primary table or as some system function
ie GetDate() then the best way to do this is in a transaction called from a
stored proc
HTH
Neven
----- Original Message -----
From: Dennis Chuah <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 21 June 2001 15:55
Subject: RE: [DUG]: [DUB-DB] trigger with parameter
Jim,
You *CANNOT* pass a parameter to a trigger - and it does not make any
sense - because a trigger is called when something happens to the data of a
table. However, you can create a new field in the table, pass the parameter
into the field, and the trigger will be able to pick it up.
Regards,
Dennis.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 21 June 2001 15:33
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: [DUB-DB] trigger with parameter
>
>
> Hi,
>
> The reason I want to pass a value as I want to write the value
> into another table which is different that the table I update.
> The value is not from original table, but from client program. I
> hope I can set the value to somewhere like a parameter, and then
> update the original table, thus trigger another table to be
> updated with the value passed.
>
>
> Cheers,
>
> Jim
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
> Sent: 2001年6月13日 15:41
> To: [EMAIL PROTECTED]
> Subject: Re: [DUG]: [DUB-DB] trigger with parameter
>
>
> Jim
>
> A trigger is internal (fired by an event on the table) so what do you
> mean by pass a value to it?
>
> Neven
>
> ----- Original Message -----
> From: Jim Zheng <[EMAIL PROTECTED]>
> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> Sent: Wednesday, 13 June 2001 15:10
> Subject: [DUG]: [DUB-DB] trigger with parameter
>
>
> > Hi all,
> >
> > Does anyone know how to pass a value ( not a field in the update table)
> into
> > a trigger? I am trying to build a MS SQL server version of our product.
> >
> > Cheers,
> >
> > Jim
> >
> >
> --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> >
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"