473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Remoting: Returning an Arraylist of datatables

Z D
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
Nov 16 '05 #1
2 4313
In article <Oy**************@TK2MSFTNGP12.phx.gbl>, no****@nospam.com
says...
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


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
Nov 16 '05 #2
Z D
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

"Sunny" <su***@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
In article <Oy**************@TK2MSFTNGP12.phx.gbl>, no****@nospam.com
says...
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


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

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Sharon | last post by:
I’m trying to build a generic Publisher-Subscriber that will work over the net, so I’m using the Remoting. I wish that the subscriber user will be notify about the messages sent by the...
3
by: Z D | last post by:
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...
0
by: Dave | last post by:
Hi all, I have a listbox that is complex bound by an arraylist. The problem is that when I delete an object from the arraylist, the listbox does not reflect those changes. I tried refreshing...
5
by: Rami | last post by:
Hey, I Tried to bind a DataGrid to an ArrayList, and had 2 problems: 1. The DataGrid shows the Length property of the items instead of their text - how can I change that? 2. After binding, I add...
16
by: stojilcoviz | last post by:
I've a datagrid whose datasource is an arraylist object. The arraylist holds many instances of a specific class. I've two questions about this: 1 - Is there a way by which I can obtain a...
9
by: Chris | last post by:
Wondering the best way of storing my data. This is data pulled and stored in the database but a lot of data manipulation goes on the client side. I never have to remove items but will sometimes...
1
by: Matthias De Ridder | last post by:
Hello, I really hope that someone will be able to help me, because I'm desperate now! I'm a student, graduating this year, and I'm working on a thesis where C# Web Services are involved. I...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
2
by: =?Utf-8?B?RHJldw==?= | last post by:
I have a current requirement to all a subsidiary to use a current legacy application and interface with my new system to inject data when appropriate. I wanted to create a web service since we are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.