I am streaming data but I notice that sometimes no rows are received.
The 18 columns from the schema are correctly detected
Can you analyse the attached binary data and tell me how many rows are in there?
The data buffer is ~30KB so I think the rows should be in there
I have tried reading in .NET using 2 methods (see below)
var streamer = new RemObjects.DataAbstract.Bin2DataStreamer(tabledata, RemObjects.DataAbstract.StreamerInitialization.ReadFromBeginning);
var dataTable = new System.Data.DataTable(queryinfo.tablename);
streamer.ReadDataTable(queryinfo.tablename, dataTable, true, true);
var deltas = new RemObjects.DataAbstract.Delta(dataTable);
streamer.ReadDelta(deltas);
streamer.FinalizeStreamer();
and
var arrData = tabledata.ToArray();
var stream = new System.IO.MemoryStream(tabledata.ToArray());
System.IO.File.WriteAllBytes("testrotabledata.bin", arrData);
streamer = new RemObjects.DataAbstract.Bin2DataStreamer();
streamer.ReadDataTable(stream, queryinfo.tablename, dataTable, true, true);
streamer.FinalizeStreamer();
FYI: when I set a breakpoint after the first FinalizeStreamer the streamer Position is only 13765
testrotabledata.zip (2.2 KB)
FYI: I write with
streamer:=TDABin2DataStreamer.Create(nil);
try
tabledata:=Binary.Create();
streamer.SendReducedDelta:=True; // FVC : Does not work
streamer.Initialize(tabledata,aiWrite);
DataTable.LogicalName:=queryinfo.tablename; // FVC: Needed for fetched tables (DataTransfer) because the LogicalName was 'Table'
streamer.WriteDataset(DataTable,[woSchema,woRows],-1); // FVC: WriteDataset without stream as first argument does not call Initialize and Finalize
if not options.Contains(OPTCLOUDDATA_INSERTONLY) then
begin
//DataTable.Delta.GetDelta().ReducedDelta:=True;
//DataTable.HasReducedDelta:=True;
//streamer.DeltaCount
streamer.WriteDelta(DataTable); // FVC: 03/2022 At present deltas are not supported yet, see https://talk.remobjects.com/t/upload-datatable-to-server-from-delphi-to-net/26374/9
end;
//FVC: This WriteDataset calls Initialize and Finalize streamer.WriteDataset(tabledata,DataTable,[woSchema,woRows],-1);
finally
streamer.Finalize();
FreeAndNil(streamer);
end;