Page 1 of 1

RowsAffected in Direct Mode

Posted: Fri 15 May 2015 01:40
by ysyang
Hi
SQL is

Code: Select all

insert into objects select * from sys.objects
delete FROM dbo.objects where type = 'S'
if Connection Provider is prNativeClient, result is

Code: Select all

(1194 row(s) affected)
(67 row(s) affected)

but if Connection Provider is prDirect, result is

Code: Select all

(67 row(s) affected)


return last RowsAffected value.
How can receive all RowsAffected values ?
Thank you

Re: RowsAffected in Direct Mode

Posted: Fri 15 May 2015 09:32
by azyk
SDAC doesn't allow to get the number of affected records for each SQL query separately - neither in Direct mode, nor when using SQL Native Client provider. The RowsAffected property contains the number of affected rows for the last executed SQL query only.

Re: RowsAffected in Direct Mode

Posted: Mon 18 May 2015 14:39
by ysyang
I understand your opinion but the following code goes in doubt.

SQL is

Code: Select all

SET NO_BROWSETABLE ON
if Connection Provider is prNativeClient, RowsAffected is -1
but Connection Provider is prDirect, RowsAffected is 0

Please check again
Thank you

Re: RowsAffected in Direct Mode

Posted: Tue 19 May 2015 08:43
by azyk
We couldn't reproduce the problem. Please compose a small sample, in which you are executing the SQL query and retrieving the value from the RowsAffected property. Send it to andreyz*devart*com .