is there a way to keep a log of all transaction for
specific table ? (updates that could come from multiple
modules that performing delete, add and change of data)

using Foxpro Database.

Re: Table Activity trace Log. by man-wai

man-wai
Tue Jun 28 03:25:08 CDT 2005

Durby vend wrote:
> is there a way to keep a log of all transaction for
> specific table ? (updates that could come from multiple
> modules that performing delete, add and change of data)

trigger?

Re: Table Activity trace Log. by Durby

Durby
Tue Jun 28 22:14:08 CDT 2005

trigger will only raise an error, how do you implement
in such a way that each transaction made to specific table
is being log ?


"man-wai chang" <toylet.toylet@gmail.com> wrote in message
news:OUdGhr7eFHA.1448@TK2MSFTNGP09.phx.gbl...
> Durby vend wrote:
>> is there a way to keep a log of all transaction for
>> specific table ? (updates that could come from multiple
>> modules that performing delete, add and change of data)
>
> trigger?



Re: Table Activity trace Log. by Esparta

Esparta
Tue Jun 28 23:15:48 CDT 2005

Do you mean about something like this?

--- FoxAudit 6.0 ---
http://www.takenote.com/DesktopDefault.aspx?tabid=3D28

--=20

=B8,=F8=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=
=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA

Espartaco Palma Mart=EDnez
SysOp http://www.PortalFox.com
M=E9xico D.F.
MoBlogs!
http://weblogs.golemproject.com/esparta/ <- Tech
http://www.espartha.com/blog/ <- Personal
VFP Bookmarks http://del.icio.us/esparta/vfp

Durby vend wrote:
> trigger will only raise an error, how do you implement
> in such a way that each transaction made to specific table
> is being log ?
>=20
>=20
> "man-wai chang" <toylet.toylet@gmail.com> wrote in message=20
> news:OUdGhr7eFHA.1448@TK2MSFTNGP09.phx.gbl...
>=20
>>Durby vend wrote:
>>
>>>is there a way to keep a log of all transaction for
>>>specific table ? (updates that could come from multiple
>>>modules that performing delete, add and change of data)
>>
>>trigger?=20
>=20
>=20
>=20


Re: Table Activity trace Log. by Durby

Durby
Wed Jun 29 00:09:16 CDT 2005

yes Esparta, something like this.
but can we implement this through our own program ?


"Esparta Palma" <espartaQUITAESTOPRIMERO@softhome.net> wrote in message
news:%23xIn6EGfFHA.576@TK2MSFTNGP15.phx.gbl...
Do you mean about something like this?

--- FoxAudit 6.0 ---
http://www.takenote.com/DesktopDefault.aspx?tabid=28

--

¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º

Espartaco Palma Martínez
SysOp http://www.PortalFox.com
México D.F.
MoBlogs!
http://weblogs.golemproject.com/esparta/ <- Tech
http://www.espartha.com/blog/ <- Personal
VFP Bookmarks http://del.icio.us/esparta/vfp

Durby vend wrote:
> trigger will only raise an error, how do you implement
> in such a way that each transaction made to specific table
> is being log ?
>
>
> "man-wai chang" <toylet.toylet@gmail.com> wrote in message
> news:OUdGhr7eFHA.1448@TK2MSFTNGP09.phx.gbl...
>
>>Durby vend wrote:
>>
>>>is there a way to keep a log of all transaction for
>>>specific table ? (updates that could come from multiple
>>>modules that performing delete, add and change of data)
>>
>>trigger?
>
>
>



SV: Table Activity trace Log. by Anders

Anders
Wed Jun 29 09:52:37 CDT 2005

Hi Durby
Trigger code is triggered by any update, insert or delete action on the
table, provided it's part of a database. Errors are nothing to do with
triggers.
CREATE TRIGGER ON MyTable1 FOR UPDATE AS mytrigger()
CREATE TRIGGER ON MyTable1 FOR INSERT AS mytrigger()
CREATE TRIGGER ON MyTable1 FOR DELETE AS mytrigger()
CREATE TRIGGER ON MyTable2 FOR UPDATE AS mytrigger()
CREATE TRIGGER ON MyTable2 FOR INSERT AS mytrigger()
CREATE TRIGGER ON MyTable2 FOR DELETE AS mytrigger()

Put this as a stored procedure in your database
FUNCTION MyTrigger
LOCAL, x, y z
X = ALIAS()
Y=SYS(0)
Z=GETFLDSTATE(-1)
INSERT INTO LOG1 (time, who,tablealias, state) VALUES (DATETIME(),M.x,M.y,
M.z )
ENDFUNC

The column state should be a memo if you have to handle tables of widely
varying number of columns.

The GETFLDSTATE value shows if it's a delete, insert or update. For Updates
it shows which columns were modified.

-Anders



Den 05-06-29 05.14, i artikeln uNHLliFfFHA.2644@TK2MSFTNGP09.phx.gbl, skrev
"Durby vend" <someone@microsoft.com>:

> trigger will only raise an error, how do you implement
> in such a way that each transaction made to specific table
> is being log ?
>
>
> "man-wai chang" <toylet.toylet@gmail.com> wrote in message
> news:OUdGhr7eFHA.1448@TK2MSFTNGP09.phx.gbl...
>> Durby vend wrote:
>>> is there a way to keep a log of all transaction for
>>> specific table ? (updates that could come from multiple
>>> modules that performing delete, add and change of data)
>>
>> trigger?
>
>


Re: Table Activity trace Log. by Dan

Dan
Wed Jun 29 11:20:28 CDT 2005

FoxAudit was written in FoxPro, so yes you could write exactly the same
thing yourself.

I'd consider it a waste of time since you can purchase FoxAudit, but if
you've got plenty of time on your hands go ahead! <s>

Dan

Durby vend wrote:
> yes Esparta, something like this.
> but can we implement this through our own program ?
>
>
> "Esparta Palma" <espartaQUITAESTOPRIMERO@softhome.net> wrote in
> message news:%23xIn6EGfFHA.576@TK2MSFTNGP15.phx.gbl...
> Do you mean about something like this?
>
> --- FoxAudit 6.0 ---
> http://www.takenote.com/DesktopDefault.aspx?tabid=28
>
>
> Durby vend wrote:
>> trigger will only raise an error, how do you implement
>> in such a way that each transaction made to specific table
>> is being log ?
>>
>>
>> "man-wai chang" <toylet.toylet@gmail.com> wrote in message
>> news:OUdGhr7eFHA.1448@TK2MSFTNGP09.phx.gbl...
>>
>>> Durby vend wrote:
>>>
>>>> is there a way to keep a log of all transaction for
>>>> specific table ? (updates that could come from multiple
>>>> modules that performing delete, add and change of data)
>>>
>>> trigger?



Re: Table Activity trace Log. by Durby

Durby
Thu Jun 30 21:36:22 CDT 2005

Thanks Ander.
this is exactly what i needed. thanks a lot !


"Anders" <anders.altberg@telia.com> wrote in message
news:BEE88255.1603%anders.altberg@telia.com...
> Hi Durby
> Trigger code is triggered by any update, insert or delete action on the
> table, provided it's part of a database. Errors are nothing to do with
> triggers.
> CREATE TRIGGER ON MyTable1 FOR UPDATE AS mytrigger()
> CREATE TRIGGER ON MyTable1 FOR INSERT AS mytrigger()
> CREATE TRIGGER ON MyTable1 FOR DELETE AS mytrigger()
> CREATE TRIGGER ON MyTable2 FOR UPDATE AS mytrigger()
> CREATE TRIGGER ON MyTable2 FOR INSERT AS mytrigger()
> CREATE TRIGGER ON MyTable2 FOR DELETE AS mytrigger()
>
> Put this as a stored procedure in your database
> FUNCTION MyTrigger
> LOCAL, x, y z
> X = ALIAS()
> Y=SYS(0)
> Z=GETFLDSTATE(-1)
> INSERT INTO LOG1 (time, who,tablealias, state) VALUES (DATETIME(),M.x,M.y,
> M.z )
> ENDFUNC
>
> The column state should be a memo if you have to handle tables of widely
> varying number of columns.
>
> The GETFLDSTATE value shows if it's a delete, insert or update. For
> Updates
> it shows which columns were modified.
>
> -Anders
>
>
>
> Den 05-06-29 05.14, i artikeln uNHLliFfFHA.2644@TK2MSFTNGP09.phx.gbl,
> skrev
> "Durby vend" <someone@microsoft.com>:
>
>> trigger will only raise an error, how do you implement
>> in such a way that each transaction made to specific table
>> is being log ?
>>
>>
>> "man-wai chang" <toylet.toylet@gmail.com> wrote in message
>> news:OUdGhr7eFHA.1448@TK2MSFTNGP09.phx.gbl...
>>> Durby vend wrote:
>>>> is there a way to keep a log of all transaction for
>>>> specific table ? (updates that could come from multiple
>>>> modules that performing delete, add and change of data)
>>>
>>> trigger?
>>
>>
>