I am using Uniquery in delphi-rio.
UniQuery's SQL.Text is:
Select ID, Column1
From Table
Here ID
is an auto-incrementing ID.
The insert statement in UpdateSQLs is:
INSERT INTO table (Column1)
VALUES (:Column1)
SET :ID = SCOPE_IDENTITY()
After ApplyUpdates();
, the value of Uniquery.FieldByName('ID').AsInteger
is returned as 0.
If you do Uniquery.ParamByName('ID').AsInteger
, it says that there is no parameter.
How can I get the ID
value?
I tried creating parameter with runtime or using DML refresh, but it doesn't work.