Hi all,

I have my own classes that derives from DataTable,
Ex.
[Serializable]
public class MyTable1 : DataTable {
public MyTable1() : base { ... }
public MyTable1(SerializationInfo info, StreamingContext context) :
base(info, context) {}
}

My business layer create and fill the table and add it to the DataSet obectr
and send serialiazed to the client via remouting, on the UI side when I get
the table the type is simple DataTable, why ? How to serialized and
desirizlized the typed DataTable, I want to get typed DaTable

with best regards
Viorel ghilas

Re: DataSet serialization by Brian

Brian
Fri Feb 06 07:25:33 CST 2004

Just construct an instance of your typed data set on the client, and use the
Merge method to pull in the data from the generic data set returned by the
remoting method. As long as the schemas match it should pull the data in to
populate the typed instance fine:

DataSet ds = myRemotingObject.GetDataSet();
MyTypedDataSet tds = new MyTypedDataSet();
tds.Merge(ds);

Hope that helps,
Brian

"Viorel Ghilas" <vghilas@hotmail.com> wrote in message
news:%23QrNy0v6DHA.1716@TK2MSFTNGP10.phx.gbl...
> Hi all,
>
> I have my own classes that derives from DataTable,
> Ex.
> [Serializable]
> public class MyTable1 : DataTable {
> public MyTable1() : base { ... }
> public MyTable1(SerializationInfo info, StreamingContext context) :
> base(info, context) {}
> }
>
> My business layer create and fill the table and add it to the DataSet
obectr
> and send serialiazed to the client via remouting, on the UI side when I
get
> the table the type is simple DataTable, why ? How to serialized and
> desirizlized the typed DataTable, I want to get typed DaTable
>
> with best regards
> Viorel ghilas
>
>
>



Re: DataSet serialization by Viorel

Viorel
Fri Feb 06 07:46:31 CST 2004

Hi Brian

Thanks, I used your technique and it's work. But could you explain why
DataSet doesn't desirilize typed datatables.

with best regrds
Viorel Ghilas

"Brian Noyes" <brian.noyes@idesign.net> wrote in message
news:urLhETL7DHA.712@tk2msftngp13.phx.gbl...
> Just construct an instance of your typed data set on the client, and use
the
> Merge method to pull in the data from the generic data set returned by the
> remoting method. As long as the schemas match it should pull the data in
to
> populate the typed instance fine:
>
> DataSet ds = myRemotingObject.GetDataSet();
> MyTypedDataSet tds = new MyTypedDataSet();
> tds.Merge(ds);
>
> Hope that helps,
> Brian
>
> "Viorel Ghilas" <vghilas@hotmail.com> wrote in message
> news:%23QrNy0v6DHA.1716@TK2MSFTNGP10.phx.gbl...
> > Hi all,
> >
> > I have my own classes that derives from DataTable,
> > Ex.
> > [Serializable]
> > public class MyTable1 : DataTable {
> > public MyTable1() : base { ... }
> > public MyTable1(SerializationInfo info, StreamingContext context) :
> > base(info, context) {}
> > }
> >
> > My business layer create and fill the table and add it to the DataSet
> obectr
> > and send serialiazed to the client via remouting, on the UI side when I
> get
> > the table the type is simple DataTable, why ? How to serialized and
> > desirizlized the typed DataTable, I want to get typed DaTable
> >
> > with best regards
> > Viorel ghilas
> >
> >
> >
>
>