Hi
When PowerServer inserts a row into a SQL Server table with an identity column, does it use SCOPE_IDENTITY () to obtain the identity value for the inserted row?
I'm only asking this because the PowerBuilder documentation states that the default value for PowerBuider is @@identity. This may not work correctly in all cases, so I change it to use SCOPE_IDENTITY(), but this isn't possible using PowerServer.
E.g.
If a row is inserted into table T1, and a trigger fires that inserts a row into T2.
@@IDENTITY returns the identity key for the row inserted in T2
SCOPE_IDENTITY() returns the identity key for the row inserted in T1
PowerBuilder identity Reference
https://docs.appeon.com/pb2022/connection_reference/Identity.html
Cheers
Jim
Have you hugged a DataWindow today? ;-)
I (metaphorically) hug them every day - they are the jewel in PowerBuilder's crown!
DW painter can be tedious, but I have a system to generate our DW text and column layout syntax, so I just have to edit the source and it's 99% done.
Cheers
Jim