based on the hint from Terry i went to pbodb115.ini
and in [MS_SQLSERVER_SYNTAX] section found
GetIdentity='Select @@identity'
; GetIdentity='Select max(IDENTCOL) from &TableName'
in pbl 115, this setting plugs in the global identity which is wrong.
then, i surely assumed that the second GetIdentity must be active:
; GetIdentity='Select @@identity'
GetIdentity='Select max(IDENTCOL) from &TableName'
now, the pbl 115 plugs null in identity.
obviously, Select max(IDENTCOL) fails.
this looks like a critical PBL 115 bug to me,
but i do not want to start panicking yet.
i might be still missing something in pbl 115 setup.
pls advise.
thank you, sasha
PS
out of natural curiousity, i brought up my old PBL 90 application,
and found out that pbl 90 disregards which GetIdentity is active
in pbodb90.ini.
somehow, PBL 90 always plugs in the max(IDENTCOL) of the table
which gives the correct identity value.
funny enough, this looks like a PBL 90 "positive" bug, so to speak.
For SQL Server we use:
GetIdentity='Select IDENT_CURRENT (''&TableName'')'
You can search the web for "@@indentity SCOPE_IDENTITY IDENT_CURRENT" and will get
a detailed description of the differences at the Microsoft Transact-SQL Help.
hth
Arnd
thank you Arnd.
you seem to be not part of the team sybase, so
with your permission i will
suggest to team sybase to make the fix in the pbodb115.ini file:
in the [MS_SQLSERVER_SYNTAX] section
replace
GetIdentity='Select max(IDENTCOL) from &TableName'
(sybase syntax)
with
GetIdentity='Select IDENT_CURRENT (''&TableName'')'
also, make the above the default as opposed to
GetIdentity='Select @@identity'
regards, sasha
"Arnd Schmidt" <arnd.s...@gmx.de> wrote in message
news:15d4v4h2m4fe93f2l...@4ax.com...
-chris