TUniConnection.ExecSQL()

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
CristianP
Posts: 79
Joined: Fri 07 Dec 2012 07:44
Location: Timișoara, Romania

TUniConnection.ExecSQL()

Post by CristianP » Mon 10 Feb 2014 10:34

Hello,

In dbExpress I used return value of TSQLConnection.ExecuteDirect() (number of rows that were affected by the execution of the SQL query).
How can I know how many rows were affected after TUniConnection.ExecSQL()?

Best Regards,
Cristian Peta

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniConnection.ExecSQL()

Post by AlexP » Mon 10 Feb 2014 14:05

Hello,

For the time being, there is no way to retrieve RowsAffected after executing the ExecSQL method of TUniConnection. We will consider the possibility to implement such feature in one of the next versions.
For this purpose, you can use TUniQuery, for example:

Code: Select all

UniQuery1.SQL.Text = 'INSERT INTO TEST VALUES(1)';
ShowMessage(IntToStr(UniQuery1.RowsAffected)); // <-- there will be returned 1 - the number of inserted records

Post Reply