Partial class and remoting problem

K

Karkera

Hi,
I am having this weird issue with regards to the partial class.

I have a strongly typed datatable, gets data from database and gets remoted
to the client using tcp channel. This is working as expected.

Now I need to add some custom properties to this typed datatable so I
modified the typed datatable(by using the partial class) to add additional
properties.

After this modification I am finding that the remoted datatable at the
client not retaining the data for those custom properties. The data on the
typed datatable is still intact. But just the stuff in the partial class
getting lost.

Also I debugged and found this loss occurs once the remoted object received
at the client. At the server level all the values intact.

Anyone experiencing this?
 
K

Karkera

Nope there is no duplicates.. Also note that the typed datatable is retaining
the values, only the custom properties I added manually are lost.
Tried different types of properties like string, nt etc, everything lost
after getting remoted.

Thank you
 
K

Karkera

Did some more testing..
Created a couple of new test partial classes and after remoting found values
to be populated properly on the server as well as client.
But on the typeddata table any data added to the partial class custom
properties are lost at the client with value set to 'Nothing'

Thank you
 
P

Phill W.

Karkera said:
Did some more testing..
Created a couple of new test partial classes and after remoting found values
to be populated properly on the server as well as client.
But on the typeddata table any data added to the partial class custom
properties are lost at the client with value set to 'Nothing'

Just to add another voice to this - I've had much the same trouble with
DataTables since starting out with .Net, back with VS.2003 (so /partial/
classes aren't your problem!).

I can create a subclass of DataTable and add my custom code and data to
it and use it perfectly well in a /single/ application. However, I also
want to pass it around via .Net Remoting so I need to serialise it - and
I can do that as well. It's on the "other" side of "the Great .Net
Remoting Divide" that merry Hell breaks loose - I /cannot/ deserialise
this thing into any other than a /standard/ DataTable. (and yes; I've
told the binary formatter that it can format /anything/).

I revisit this issue every time a new Framework comes out to see if it's
been "fixed"; sadly, I'm still waiting. :-(

Regards,
Phill W.
 

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