473,327 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 2644
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mike M | last post by:
Is it possible? In the parent process, I have a socket that binds, listens and then accepts new connections (which creates new sockets in the process). I want to be able to pass some of these new...
4
by: Jack | last post by:
Hi, I have a hashtable that I need to pass around to different Business Objects. My question is it better to pass it and make a locale hashtable variable and set it equal to the passed hashtable...
3
by: John Baker | last post by:
Hi:7 Newby here to ASP, and using the ASP.NET Web Matrix development tool. While that tool looks great for a Newby, I have run into a snag. I have an HTML Text Box which I have named HireInput,...
1
by: Larry Bird | last post by:
I want to pass a dataview to another subroutine. I've successfully created the datavew as follows: For Each CriteriaDetailRow In AlertData.AlertDS.Tables("EventCriteria").Rows Dim foundRows()...
7
by: J055 | last post by:
Hi I'm a little confused by this so would appreciate some advice on ways to deal with the following. When I call the CodeMaker.Update static method for the second time I want the dt parameter to...
1
by: martin | last post by:
This code compiles (this is how it should work): Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); This code does not compile (passing an int instead of...
2
by: bubzilla | last post by:
hi got a little prob with data types. I´m reading data from a socket in to a unsigned char buf; . Now, lets say there are 60Bytes written into the array( but it is always different). Now i...
2
by: darthghandi | last post by:
I am trying to pass a socket object when an event is signaled. I have successfully bound to a network interface and listened on a port for incoming connection. I have also been able to accept...
2
by: senglory | last post by:
My WCF: public interface IWorkbookService { DataTable GetDownpayments(KeyValuePair<int, string> sgm); } class WorkbookService : IWorkbookService
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.