Problem with TMSQuery in Multitier Applications

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Wed 30 Nov 2011 06:51

Problem with TMSQuery in Multitier Applications

Post by mashinchi » Wed 30 Nov 2011 07:16

Hi, I'm working on a multitier application that I use TClientdataset and TProvider and TMsquery to connect and fetch Data from a Table on my DB.
when i use simple commandText in MSQuery such as :
Select * From MyTable
(myTable has over 200000 records)
and open the ClientDataset after 2 sec all of the data fetched but problem is that :
When I use Order By DESC clause in my commandtext such as
Select * From MyTable Order By Id DESC
and open the clientdataset this take over 30 sec.
I did my test with TAdoQuery in each way its take 10 sec.
I wanna use TMSquery in my application because fetching data in MSQuery is very fast. Please help me how can i fix this problem.


Post by AndreyZ » Thu 01 Dec 2011 11:10


Please check that you set the same cursor types for both SDAC and ADO. Please note that if you are not using the ctDefaultResultSet cursor type in SDAC, you should set the CursorLocation property to clUseServer in ADO components to obtain the same functionality.

Post Reply