I am using SQL Server database and after calling a simple SQL script I would like to know how many records were affected by last (or only) executed statement in a script.
I cannot find the reference how to achieve this in Delphi’s TADOCommand and I know SQL Server gives this information to provider. I am aware of workarounds like getting @@ROWCOUNT in another query, yet this gives some overhead and unnecessary complexity.
Thanks.
Do you use the
version of the Execute method?
From the doc:
So that should give you what you need.
Disclaimer: I cannot test this against SQL Server (don’t have it).