>>le.
>>>
>>>How about if I'm using a VFP DBC? Is there a way to get to the new values?
>>
>>You're on the new record when INSERT trigger fires in VFP.
>
>Well that's what I thought. But this code
>case tcTriggerType = "I"
> select top 1 rtp_id from rtp_projects order by keyid desc into array a1
> insert into changelog (editdate, editby, rtpid, newvalue) values (datetime(), employee, a1, "Project created")
>
>returns the RTP_ID from the previous last record not the new one. So I'm guessing the new record hasn't been created yet. ??
The record is not committed yet when trigger fires, you can not use SELECT statement in the trigger code to query the table which you have trigger on.
If it's not broken, fix it until it is.
My Blog