RTC Forums

Subscription => Support => Topic started by: ronC on October 31, 2018, 12:40:00 AM



Title: Fetching Multiple Result Sets
Post by: ronC on October 31, 2018, 12:40:00 AM
Hi,
I'm currently using the following to return data from a stored proc and populate a mem table.
        RtcDataSetFieldsToDelphi(RtcValue1.asDataSet, gridT);
        gridT.CreateTable;
All great, however some stored procs return multiple datasets  ::)
and only the first is returned
Is there currently any way to retrieve multiple dataset results ?

thanks
Ron


Title: Re: Fetching Multiple Result Sets
Post by: D.Tkalcec (RTC) on October 31, 2018, 07:56:20 AM
You can store any data structure you want with TRtcValue objects (any field inside a TRtcDataSet, TRtcRecord, TRtcArray and TRtcFunctionInfo object can be of any data type - including these complex data types) and send it with RTC Remote Functions, but ... you need your own functions for copying data from a TDataSet to TRtcDataSet and back if you are sending complex data types like nested datasets or some other database-specific field types, because functions provided in the "rtcDB.pas" unit ONLY serve as basic examples and can ONLY handle the most basic data types.

In other words, you can copy "RtcDataSetFieldsToDelphi" and other related functions from the "rtcDB.pas" unit into your own unit (give each function a new name) and modify them to do what you need, or ... just use these functions as examples (that's what they actually are) and write your own.


Title: Re: Fetching Multiple Result Sets
Post by: ronC on October 31, 2018, 11:27:54 AM
Got it. Thanks for your help