RTC Forums

Subscription => Support => Topic started by: bebeantics on March 27, 2018, 03:19:34 PM



Title: rtcclientdataset not bind with listview
Post by: bebeantics on March 27, 2018, 03:19:34 PM
Hi

I have problems with rtcclientdataset, on android device.
How it is?


I have a function that returns a datasource

On the onresult site I wrote the following:
if (Data.isType=rtc_Function) and (Data.asFunction.FunctionName='getcomanda') then begin

                 if Result.isType = rtc_Dataset then begin

                      dt.rtcmemcom.asdataset := Result.asDataSet;
                      Result.Extract;

                      dt.rtcmemcom.Active := True;

                 end
                 else if result.isType=rtc_exception then
                      showmessage(result.asException);

        end;

dt.rtcmemcom get the values from the onresult.

The situation is this:

if I use fieldeditor to format the fields resulting from the function, I do not have records (tested with recordcount) when opening / activating rtcclientdataset. When I delete everything from the fieldeditor, I have records in rtcclientdataset (tested with recordcount) but I do not have fields to link (bind) to a listview.


I've been testing this problem all day, and I'm not finding a solution to solve it.

The invoked function returns a string field and three float fields


Title: Re: rtcclientdataset not bind with listview
Post by: D.Tkalcec (RTC) on March 27, 2018, 04:11:41 PM
What is "dt" and what is "dt.rtcmemcom"?


Title: Re: rtcclientdataset not bind with listview
Post by: bebeantics on March 27, 2018, 04:13:44 PM
dt is a datamodule
rtcmemocom  is a trtcclientdataset


Title: Re: rtcclientdataset not bind with listview
Post by: D.Tkalcec (RTC) on March 27, 2018, 04:19:25 PM
"TRtcClientDataSet" is nothing more than a "TClientDataSet" component from Delphi, with a few additional properties and events for monitoring changes to records. Anything beyond that is from the "TClientDataSet" component. In other words, whatever works with a "TClientDataSet" component should also work with the "TRtcClientDataSet" component. You can find the complete implementation of the "TRtcClientDataSet" component in the "rtcDBCli.pas" unit.