TMSQuery and RowsAffected
Posted: Fri 07 Oct 2016 10:14
Hello,
I want to insert a new row into a table with an autoincrement field and want to know the autoincrement value after row inserted.
usually I use TMSSQL but I want a feedback so I think Ihave to use TMSQuery instead with following example syntax:
The statement works fine, but I get -1 as RowsAffected, but should be 1?
Is this a bug or a mistake on my side?
best regards
Hans
I want to insert a new row into a table with an autoincrement field and want to know the autoincrement value after row inserted.
usually I use TMSSQL but I want a feedback so I think Ihave to use TMSQuery instead with following example syntax:
Code: Select all
INSERT INTO Table (fieldA)
OUTPUT Inserted.Id
VALUES ('xyz')
Is this a bug or a mistake on my side?
best regards
Hans