Page 1 of 1

How to return the specific data result set

Posted: Sun 14 Jun 2020 13:01
by tcflam
Stored procedure returns 3 dataset. How to handle in TMSStoredProc? And could it return specific dataset in DBGrid? I'm using SDAC 9.2.4 and XE2

Re: How to return the specific data result set

Posted: Mon 15 Jun 2020 11:02
by Stellar
You can skeep unused datasets by calling the OpenNext method method the respective number of times.

See our documentation for more information on opening subsequent datasets:
https://www.devart.com/sdac/docs/devart ... next().htm

Re: How to return the specific data result set

Posted: Mon 15 Jun 2020 11:47
by tcflam
Thanks. I tested your suggestion. But how to using single TMSStoredProc to show different dataset into different DBGrid?

Re: How to return the specific data result set

Posted: Fri 19 Jun 2020 05:24
by Stellar
TMSStoredProc can display only one dataset at a time. If you need to open multiple datasets simultaneously, you may try using the OpenDatasets method of TMSConnection, for example:

MSQuery1.SQL.Text := 'SELECT * FROM Dept';
MSQuery2.SQL.Text := 'SELECT * FROM Emp';

MSConnection1.OpenDatasets([MSQuery1, MSQuery2]);

See this page for more information on opening multiple datasets simultenously
https://www.devart.com/sdac/docs/devart ... set[]).htm