Passing a DataTable By Value Over a Socket

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Um9oaXQ=?=

    #1

    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?

  • John Saunders [MVP]

    #2
    Re: Passing a DataTable By Value Over a Socket

    "Rohit" <Rohit@discussi ons.microsoft.c omwrote in message
    news:9CBDFF0C-4769-4B40-AA59-0D3AE0E4BC02@mi crosoft.com...
    >I need to pass a DataTable object by value over a tcp socket.
    >Unfortunatel y,
    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


    Comment

    • Cezary Nolewajka

      #3
      Re: Passing a DataTable By Value Over a Socket


      You can use serializers (XmlSerializer or BinarySerialize r).

      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.saunder s at trizetto.comwro te in message
      news:OKLO1$qUIH A.4360@TK2MSFTN GP06.phx.gbl...
      "Rohit" <Rohit@discussi ons.microsoft.c omwrote in message
      news:9CBDFF0C-4769-4B40-AA59-0D3AE0E4BC02@mi crosoft.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
      >
      >

      Comment

      Working...