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];
}
I strongly suggest you to head to this article entitled DataSnap connectivity for iOS using Delphi XE2 and FireMonkey posted on EDN by Anders Ohlsson.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With