Page 1 of 1

Multiple result sets questions

Posted: Tue 12 Jan 2021 14:58
by upscene
Hi,

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,

Martijn

Re: Multiple result sets questions

Posted: Mon 18 Jan 2021 15:43
by Stellar
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.