Create Binary from DataTable in C#

Hi,

At the moment we have the following code in a Delphi Server:
DataStreamer2.WriteDataset(Result, dataSet, [woRows, woSchema], -1);

DataStreamer2 is of type Bin2DataStreamer
Result is a Binary
dataSet is a IDADataSet

It works like a charm.

How would i rewrite the above to C#? The idea is that we need to execute dynamic sql, pack it up and unpack it at the client side. At the moment we have both Delphi and C# clients and this code works perfectly.

We are looking at porting parts of the server interface to C#.
Are there some examples I can look at?

regards
Paul

Hello

I’ve attached a sample code. Add it to a console app and reference Remoting SDK and DataAbstract assemblies to see it in action: Program.cs (2.1 KB)

As you can see here a sample table is being serialized into a Binary and is restored back from it.

Regards