Retrieve values from a ClientDataSet

430 views Asked by At

I am writing a WebService that implements 3 interfaces. One of them uses a reference to a COM Interface named Interop.XXXOra. In the public interface of Interop.XXXOra i've got the functions "GetShiftReportData" and "DoEndOfShift":

int DoEndOfShift(string ClientKey)
    Member of EPS30Ora.IEPS30Svr

dynamic GetShiftReportData(string ClientKey, int ShiftNo)
    Member of EPS30Ora.IEPS30Svr

GetShiftReportData returs a ClientDataset (delphi)

This is the line in my webservice where i call it:

int shift_num = svr.DoEndOfShift(inputparams.ck);
object shift_data = svr.GetShiftReportData(inputparams.ck, shift_num);

I don't get any error buy i dont get nothing in shift_data.

I would need to know how to access the returned cliendataset in order to send those values to the client.

Any help will be much appreciated. Thanks

1

There are 1 answers

0
nachbar On

In your question (both the title and the last substantive sentence), you seem to be saying that you have a "returned clientdataset" that you want to access.

I don't know what your client is, but other than the data-oriented interface to TClientDataSet, I think the best and easiest way to access a TClientDataSet's data is to use the SaveToStream method. You can ask for the data in an XML format, which you can easily transmit to a client, which can use any standard library to read the data.

However, in the line above the final question, you say that you don't get anything in shift_data. If you don't have a TClientDataSet, you obviously won't be able to use SaveToStream method.

Hope that helps a little.