22

I'm looking at the feasibility of using a Delphi XE2 DataSnap server pushing data from a SQL server through to an iPad application.

I've written the DataSnap server application, and am looking now at the iOS application. The TServerMethod returns the data as a TDataSet in iOS. What isn't clear is how does one go about extracting the resulting TDataSet in Xcode as a NSMutableArray? Below is the generated code in the DSProxy.m:

-(id) getTServerMethods1_GetMileageList {
    return [NSArray arrayWithObjects:
        [DSRESTParameterMetaData parameterWithName: @"Value" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
        [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDataSet"],
    nil];
}
user16217248
  • 3,119
  • 19
  • 19
  • 37
James
  • 251
  • 1
  • 5
  • you may want to add or modify your tags to reflect that your issue is related to objective-C – ardnew Feb 08 '12 at 20:02

1 Answers1

1

It looks like straight JSON that gets sent down to the client - so you should be able to use existing api's to turn it into NSStrings, NSNumbers, etc. Slightly similar to here: NSJSONSerialization gives me error "Duplicate key"

Community
  • 1
  • 1
Scott Corscadden
  • 2,831
  • 1
  • 25
  • 43