RTC Forums
March 29, 2024, 07:43:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Fetching Multiple Result Sets  (Read 4130 times)
ronC
RTC License++
*****
Posts: 2


« 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  Roll Eyes
and only the first is returned
Is there currently any way to retrieve multiple dataset results ?

thanks
Ron
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 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.
Logged
ronC
RTC License++
*****
Posts: 2


« Reply #2 on: October 31, 2018, 11:27:54 AM »

Got it. Thanks for your help
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.