Remote a DataTable?

L

lucius

I have a class that is a subclass of a subclass of a DataTable. I
would like to Remote an instance of it (SingleCall), but if I recall
correctly only classes that inherit from MarshalByRefObject can be
Remoted.

So how can I remote my DataTable-inheriting class? Is it possible to
iplement all of the Remoting Interfaces that make up
MarshalByRefObject and make the class implement that? Help!

Thanks.
 
W

WenYuan Wang [MSFT]

Hello Lucius,

You are correct. Marshal is necessary in .net remoting world.
However, the DataSet and DataTable objects has inherited from
MarshalByValueComponent, and support the ISerializable interface for .NET
Framework remoting. These are the only ADO.NET objects that you can use for
NET Framework remoting. Please check the NOTE part in following document.
http://msdn2.microsoft.com/en-us/library/system.data.datatable.aspx
[DataTable Class]

Therefore, it is not necessary for you to implement all of the Remoting
Interfaces again in new DataTable-Inheriting class. Just declare it as
Serializable. Such as:

[Serializable]
class MyTable:DataTable
{...}

Hope this helps.
Sincerley,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

WenYuan Wang [MSFT]

Hello Lucius,

This is Wen Yuan again.
Have you resolved the issue so far or met any further issue?
If so, please feel free to update here again. We are glad to assist.

Have great day,
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top