- John Raghanti
- PowerBuilder
- Tuesday, 22 October 2024 06:14 PM UTC
Hi! I'm running PB 2022 R3 Build 3391 with MS SQL Server databases. We just moved from R2 to R3 recently.
I've got a datawindow with an Identity Column specified in the update properties:
I call dw.Update() in code and then (since 2017 at least) I grab transaction_id for the inserted row to set the foreign key for other relevant tables.
I started getting FK errors that it didn't exist. When I step through the code, I am getting a value in the identity column, but it is not the value of the inserted row. There is a trigger on this table that inserts some auditing data (and has since at least 2017), and I am getting the identity value for the auditing entry.
If I insert a row in SSMS, and do a select scope_identity(), it does come back with the correct data for transaction_id.
Did something change in R3? Looking for assistance.
Thanks!
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.