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];
}
我强烈建议您使用由Anders Ohlsson在EDN上发布的Delphi XE2和FireMonkey撰写的题为DataSnap的iOS连接 。
它看起来像直接JSON被发送到客户端 - 所以你应该能够使用现有的api将其转换为NSStrings,NSNumbers等。这里略有类似: NSJSONSerialization给我错误“Duplicate key”
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.