retrieve autoincrement


I'm a bit stuck on using remotedb with tdbgrid on record insert.

how do i retrieve the autoincrment primary key
from the server and update the grid with it

currently, I retrieve the key with "select @@identity" with different xdataset,
then refresh the dataset locate the record by this key,
then put the dataset in edit mode again.
I am sure there must be a more elegant way?

[remotedb server with firedac connected to MSSQL
key defined in table as "ID int identity(1,1) primary key, ...]

Hello @KOTZE_JW, welcome to TMS Support Center!

Correct, that's the way to do it.

thank you Wagner!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.