Page 1 of 1

dbnotify

Posted: Tue May 28, 2013 8:46 am
by skiman
Hi Roger,

Today I discovered your dbnotify sample. This is GREAT! With 3 lines of code I can log changes in a database. This saved me days of work!

Code: Select all

 if lNotify
	oNotify := KLANT->(DC_DbNotify():new())
	oNotify:writeBlock := {|cEvent,cAlias,cDesc,oNotify|WriteData(cEvent,cAlias,cDesc)}
	oNotify:SetNotifications( { DBO_TABLE_UPDATE, DBO_TABLE_APPEND, DBO_TABLE_DELETED }, { 'NAAM', 'BTW_NR', 'BET_DAGEN', 'BET_EINDE', 'PRIJSCAT' , 'FAKT_KLANT' , 'ADRES', 'EMAIL' } )
 endif
With the above code, I just have to change the alias and the fieldnames, and I can log all database modifications for the files I want. :clap:

Re: dbnotify

Posted: Thu May 30, 2013 4:14 pm
by rdonnay
I'm happy that your'e happy!! :banana-dreads: