Serialising a DataTable-derived class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phill W.

    #1

    Serialising a DataTable-derived class

    (Using VB'2005) I'm trying to serialise a DataSet that contains a
    "table" that is a Class derived from DataTable.

    <Serializable() _
    Class CustomDataTable
    Inherits DataTable
    . . .

    I create the DataSet and my custom Table, add one to the other, then
    serialise the whole lot into a file. In that file, I can see Type
    information related to the /DataSet/, but nothing for my custom table;
    that seems to have been replaced by a "DiffGram", whatever /that/ is.
    If a replace my table with a "real" DataTable, the file look pretty much
    the same.

    Given that my eventual aim is to be able to load up DataSets with lots
    of custom Table classes and serialise them all (via Remoting), this is a
    /bit/ of a show-stopper.

    Do I /really/ have to write all the serialisation code (GetObjectData,
    New(context,inf o)) myself or should this happen automagically?

    Can anyone suggest a good [online] reference on Serialisation
    /specifically/ in conjunction with the *Data classes?

    TIA,
    Phill W.
Working...