I am inserting a record on a SQL-Server 2000 table with an identity on its primary key. I want to get the value inserted on the primary key. I know I should execute this sentence:
but it doesn't work on the embedded SQL code in PowerBuilder, I get a syntax error. I tried to use SELECT @@IDENTITY FROM DUAL, where DUAL is a table which I created with a single record, but the gotten result is NULL.
I'm using OLE-DB provider for SQL-Server.