470,636 Members | 1,970 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

Passing a DataTable By Value Over a Socket

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?

Jan 9 '08 #1
2 2570
"Rohit" <Ro***@discussions.microsoft.comwrote in message
news:9C**********************************@microsof t.com...
>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?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Jan 9 '08 #2

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

"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
"Rohit" <Ro***@discussions.microsoft.comwrote in message
news:9C**********************************@microsof t.com...
>>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?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Jan 15 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Mike M | last post: by
4 posts views Thread by Jack | last post: by
3 posts views Thread by John Baker | last post: by
1 post views Thread by Larry Bird | last post: by
7 posts views Thread by J055 | last post: by
2 posts views Thread by bubzilla | last post: by
2 posts views Thread by darthghandi | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.