I would like to make a set of "k" + OldTableName to
carry all deleted data information.
My trigger will call an extenal kMover.prg and the coding will be:
LPARAMETERS oTable, oKey, oKey2
LOCAL kTable, kKey, kKey2
SELECT &oTable
kKey = &oKey
if pcount() = 3
kKey2 = &oKey2
endif
kTable = "k" + Alltrim(oTable)
use in kTable
use &kTable in 0 shared
if pcount() = 3
Append from oTable for "&oKey" = &kKey and "&oKey2" = &kKey2
else
Append from oTable for "&oKey" = &kKey
endif
use in kTable
Previously, I have make a version on Recno() but still error on
trigger because the pointer try to move around!!
* Previously passing oTable, oRecno
...
Append from oTable for Recno() = oRecno
Of cos, if possible, add datetime() field to mark when delete and
also if possible, take out the Novell system "USER" Variable
to know who did it it better. GETENV("USER")
But firstly I fail to Move it to another table when triggering!
So, any suggestions to do so instead of above .prg?
Now, I will take a look on avoiding if kTable not exist.
I think this part I can do it! ^_^"
but really I have no idea to copy current record to another table.
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.