cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble scope_identity()

Former Member
0 Kudos

Working with PB12.6 and SQL Server 2008

Trying to get identity column from Table T1 which fires a trigger to insert in Table T2. I need to get id from T1 but instead get the T2 value.

I tried inserting 'Identity= =Scope_identity()' in the extended properties in the Database profile. Any help would be greatly appreciated. Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Never mind, found solution:

Look for the Initialization path from Tool-System options

In the folder look for the pbodb126.ini and then search for the GetIdentity() setting in the MS_SQLSERVER_SYNTAX section and then comment out the line that used @@identity and replace it with the scope_identity setting:

;GetIdentity='Select @@identity'

GetIdentity='Select scope_identity()'

Answers (0)