Hi.
I was using SCOPE_IDENTITY() trick in OnAfterUpdateRecord of TProvider, but it is not working any more since SELECT SCOPE_IDENTITY() called from event is executed in another scope.
Using DBMonitor, I can see that INSERT INTO (...) is executed via one Cursor and SELECT SCOPE_IDENTITY() via another cursor which is other scope, and i allways get NULL as result.
SELECT @@IDENTITY retreives a value, but it is wrong one if table has triggers which update another table (and that is the main reason why SCOPE_IDENTITY use is advised over @@IDENTITY).
Any help on how to retreive correct IDs after inserting into table?