Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy Current Record to another table in Trigger?
Message
 
To
16/03/1998 21:26:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00084645
Message ID:
00084982
Views:
32
>Justok,

I am sorry if what I suggested messed up your data file, please forgive me.
Please check help file for copy to array using next 1 so it only affect the current rec.


The problem still here!!
>Because COPY TO ARRAY need 'For' Cause to select record to COPY!!
>else all record will copy to array!! >_<"
>
>I think I need to Use the table again with different alias and try..
>But I afraid to Use in Diff_Alias as Close the table...
>
>
>>I don't know how this will work from a trigger, but I copy the record to
>>an array
>>
>>then when you open the form, you INSERT into table from array and then
>>REPLACE the fields with the current information.
>>
>>Hope this helps, have a good day.
>>
>>>Because I cannot use:
>>>on Update/Delete Trigger, For reasonable audit log to prevent
>>>mis-use or mal-use, usually copy current record to another hided table
>>>With 2 additional fields, DateTime and UserName
>>>So, I create a kMover.prg and add simple kMover(Mytable) on
>>>trigger and the following is the Coding but....
>>>
>>>* kMover.Prg
>>>LParameter oTable
>>>LOCAL nRecno, auditTable
>>>
>>>Select &oTable
>>>nRecno = RECNO()
>>>auditTable = "k" + '&oTable'
>>>select &auditTable
>>>APPEND FROM &oTable FOR RECNO() = nRECNO
>>>* The last line cause error as the cursor try to move around!!
>>>So, What Can I do...
>>>
>>>How to copy current Recno to new table in Trigger??
>>>if use: APPEND FROM &oTABLE
>>>all data in &oTAble will copy to new table...
>>>but how to make the 'For' condition available on current recno???
>>>Or any alternative method to do so?!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform