Passing a DataTable By Value Over a Socket

  • Thread starter Thread starter Rohit
  • Start date Start date
R

Rohit

I need to pass a DataTable object by value over a tcp socket. Unfortunately,
I am forced to use the .NET framework ver. 1.1 for reasons that I don't want
to get into. Does anybody know how I can do this?

Note: if I had been luck enough to be able to use the .NET Framework ver.
2.0, I could have just converted the table to XML and sent it across, right?
 
Rohit said:
I need to pass a DataTable object by value over a tcp socket.
Unfortunately,
I am forced to use the .NET framework ver. 1.1 for reasons that I don't
want
to get into. Does anybody know how I can do this?

Note: if I had been luck enough to be able to use the .NET Framework ver.
2.0, I could have just converted the table to XML and sent it across,
right?

You can also do it with .NET 1.1. Add the DataTable to a DataSet, then
serialize the DataSet.

Could you also use .NET Remoting?
 
You can use serializers (XmlSerializer or BinarySerializer).

If the DataTable is Serializable (and as far as I can remember in .Net 1.0
it is) then you don't event have to add it to DataSet and still after
serialization send it over the wire. Not adding to DataSet would be more
performant due to less amount of data.

--
Best regards,
Cezary Nolewajka

Consultant | Microsoft Services | Microsoft | Poland
 
Back
Top