Data Abstract for JAVA (7.0.69.1081)

时间:2016-07-21 10:27:19
【文件属性】:

文件名称:Data Abstract for JAVA (7.0.69.1081)

文件大小:436KB

文件格式:JAR

更新时间:2016-07-21 10:27:19

Java Android 数据库

服务器端(Delphi)生成Dataset流: function TDBService.ExecSqlQuery(const aSQL: UnicodeString): Binary; var daDataset: IDADataset; daConn: IDAConnection; begin daConn := Connection; if daConn.InTransaction then raise Exception.Create('服务器忙!'); Result := Binary.Create; try daDataset := daConn.NewDataset(aSQL); daDataset.Open; except on E: Exception do raise Exception.Create(E.Message); end; DataStreamer.Initialize(Result, aiWrite); try DataStreamer.WriteDataset(daDataset, [woRows, woSchema], -1); finally DataStreamer.Finalize; end; end; JAVA客户端使用方法: String aSQL = "SELECT * FROM TABLE"; byte[] fData = MyService.ExecSqlQuery(aSQL); ((DataStreamer) fDataModule.DataAdapter.getDataStreamer()).InputDataFromStream(fData,fDataModule.dataTable); 原版(dataabstract.jar)无法读取服务器端传入的Dataset流,因此加入InputDataFromStream(byte[] aSource, DataTable aDestination); 来完成这一工作,希望以各位也有用。


网友评论