Multiple result sets questions

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 286
Joined: Thu 19 Oct 2006 08:13

Multiple result sets questions

Post by upscene » Tue 12 Jan 2021 14:58


When for example, calling a stored procedure that returns multiple result sets, with TMSQuery, I've got the following questions:
  1. How do you know if there are multiple result sets?
  2. Can you have multiple result sets active? (for displaying in grids)
  3. Can you open a previous result set?
I know about OpenNext, but it closes the current result set if there's only 1, so that's not an answer to the first question.

With regards,


Devart Team
Posts: 389
Joined: Tue 03 Oct 2017 11:00

Re: Multiple result sets questions

Post by Stellar » Mon 18 Jan 2021 15:43

1. It's not possible to find out the number of result sets -- you can only try to get the next result set by calling the OpenNext method.
2. A dataset can contain only one result set.
3. You cannnot navigate to the previous result set. The only way to access the needed result set is to run the query again and navigate to it.

Post Reply