Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does the insert trigger fire?
Message
From
13/11/2008 18:43:41
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01361793
Message ID:
01361816
Views:
11
>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. ??
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform