Can't return correct recordcount.

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 2
Joined: Mon 15 Aug 2011 08:37

Can't return correct recordcount.

Post by fb4819 » Mon 15 Aug 2011 09:12

SDAC 4.8+Delphi2007
While use TDataSetProvider ,TClientDataSet and TMSQuery to get data,there give incorrect recordcount

Code: Select all


MSQuery1.Sql.Text:='SET NOCOUNT ON
select identity(int,1,1) id, 1 aid into a
select *  into b from (select 1 id,'001' v union select 1,'002') x
select,b.v from a,b where order by
drop table a
drop table b';

In the abstract it will return two records but return one records .
It is happend while use UniDac 3.70


Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 15 Aug 2011 10:43

In order to solve this problem you should include the poRetainServerOrder option into TDataSetProvider.Options.

Posts: 2
Joined: Mon 15 Aug 2011 08:37

Post by fb4819 » Mon 15 Aug 2011 13:11

Thanks verymuch! It's resolved my problem.

Post Reply