Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2004

Tip: Looking for answers? Try searching our database.

Remoting: Returning an Arraylist of datatables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Z D - 26 Oct 2004 15:27 GMT
Hello,

I'm currently using Remoting (HTTP/Binary) to remote a simple object.
Everything is working fine except for one function that returns an arraylist
of datatables.

When I call this function, nothing is returned (ie length of array =0).
However, if I comment out my config file so that the DLL is run locally
instead of remoting it, everything works fine!!

So, my question is: Is there anything special that I need to do in order to
return an arraylist of datatables?  Note: If I return a single datatable it
works fine, just the arraylist of dt's dont seem to work via remoting.....

Thanks in advance,
-ZD
Sunny - 26 Oct 2004 16:52 GMT
> Hello,
>
[quoted text clipped - 12 lines]
> Thanks in advance,
> -ZD

Hi,
and what happens if you return an ArrayList, which contains some strings
only?

I this works, that as far as I remember there was some problems with
datatables/datasets with remoting. What you can do is to create a
dataset, which holds all these tables. The you export this dataset in
XML string and pass this string over remoting. You are not going to
loose any performance, as datasets are always serialized to XML, even
with binary formatter. Then on the client side you can recreate the
dataset from the string and access the tables. Nor very elegant
solution, but it should work.

If passing the arraylist with strings does not work, than most probably
you have some remoting configuration problem.

Also, you may try to capture the appdomain.Resove event and see if
during the serialization/deserialization there is some assembly missing.

Sunny
Z D - 28 Oct 2004 15:57 GMT
Sunny,

Thank's for your reply.

The problem was that my remoted object was exposing an arraylist as a
property.  Apparently doing: RemoteObj.ArrayListProperty.Add(something)
doesn't seem to work. So instead, I've had to replace the property with a
method that accepts an arraylist as a parameter and then I set my internal
arraylist variable equal to the param. that was passed in.   Now things seem
to work fine.

Any idea why that doesnt work?

Thanks
-ZD

>> Hello,
>>
[quoted text clipped - 37 lines]
>
> Sunny

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.