INPUT-OUPUT parameters and .NET clients

Posted by Admin on 20-Sep-2007 19:00

Hi All,

I developed a generic calling procedure modelled after the OERA service adapter concept to run Progress procedures that will be called from .NET clients. The called procedures will be passing datasets with different definitions. Also, sometimes the datasets will be passed in and other times they will be passed back out.

I used a single INPUT-OUTPUT DATASET HANDLE parameter to support passing the different datasets both into and back from these procedures. This design works wonderfully when tested from a Progress client but I'm not sure if it will work for a .NET client. I've seen the PSDN sample code that showed a dataset passed dynamically as an output parameter using a dataset handle, but I don't see any examples of an INPUT-OUTPUT dataset handle parameter.

I don't see any parallel parameter type in .NET for input-output parameters. Can I use this design and call the generic procedure from .NET using a dataset handle as an input parameter to pass data in and an output parameter to pass data back out, or will this generate a parameter mismatch error? The other alternative is to pass both input and output dataset handles and always pass one of them as null. Before I change my existing code I wanted to see if someone else has tried this before.



All Replies

Posted by Admin on 20-Sep-2007 23:21

In my .NET OERA client architecture INPUT-OUTPUT PARAMETER DATASET-HANDLE does work pretty well. The equivalent in C# is a ref parameter.


Posted by Admin on 21-Sep-2007 15:54


Thanks for the response. When I say a 'parallel parameter' in C#, I mean how do I call my generic ProxyGen procedure. I know that a ref type parameter is the same as a handle in that you're passing it by reference. What I need to know is can I do the following...

1. C#.NET Call to return a dataset:

System.Data.DataSet dsMyData;

appObj.callService(out dsMyData);

2 C#.NET Call to pass in a dataset (assume it's been defined):


3. Progress ProxyGen Parameter Definition in callService.p:


Since the parameter types are mismatched between the .NET call to the ProxyGen procedure and the the parameter in the procedure itself I'm not sure if this will work. This is the only way that I can think of to use a single dataset-handle parameter to pass data into the procedure and also return data back from it. So, is this correct?



This thread is closed