473,624 Members | 2,238 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4324
In article <Oy************ **@TK2MSFTNGP12 .phx.gbl>, no****@nospam.c om
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.Resov e 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.Array ListProperty.Ad d(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***@newsgrou ps.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
In article <Oy************ **@TK2MSFTNGP12 .phx.gbl>, no****@nospam.c om
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.Resov e 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
5742
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 remote publisher, so I used delegate that the user will be able to set on it his own function for that purpuse. The trouble is that this delegate must not be static because there may be many subscribers, and each subscriber may have different...
3
317
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 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!!
0
1682
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 the listbox with no luck and, because it is already bound, I can't just delete the item directly from the listbox without an error (because it already has a datasource, you are not allowed to delete/add anything to the listbox directly). The...
5
4856
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 new elements to the ArrayList but the DataGrid doesnt refresh's it's view - I have to set the DataSource property of the DataGrid to Nothing and then re bind it to the ArrayList! Isnt there a "pretier" way? Thanks ahead
16
2017
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 reference to the arraylist item the current row points to? 2 - Is it possible to sort the grid? Many thanks in advance.
9
14620
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 clear them all out. It seems to me the best way, resource wise, would be just a string array and then use redim when I have to add a new "row" of data. Arraylist & datatables seem easier to work with, but since I don't need much of the extra's...
1
2062
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 only have three weeks to finish it all! My GUI and Web services were finished, but I hadn't tested them. So I linked the GUI to the Web service and started testing them.
5
19579
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 having a problem in the calling program. I searched online and found suggestions that I return an Array instead so I modified my code (below) to return an Array instead of an ArrayList. Now I get the message when I try to run just my webservice...
2
2625
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 both .Net shops and this would seem to be the easiest method. But I ran into one snafu. I wanted to return to the subsidiary an ArrayList of my Organization objects which contain the orgs id, name etc. so they can use that information in the data...
0
8170
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8334
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6108
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2604
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.