OERAControl for .NET

Posted by zaphod on 19-Mar-2007 16:09

I have been using the concepts shown in the first version of the OERA Implementation white paper. One of them is called the OERAControl which is a .NET class that uses the Openedge .NET Open Client Runtime. I absolutely love this concept and want to use it to its full extent except that there is a problem in it.

It works beautifully for datasets that contain only one datatable. But if you have a dataset with multiple tables (ie order, orderline), and try to execute the SaveChanges operation on it, the OERAControl crashes with 'Index was outside the bounds of the array.' during the runProcedure call. Which is no big deal if there were no errors during the save, but if there were errors (conflicting changes or record locked), these errors would never be reported back to the UI because of the crash.

You can actually reproduce this error using the sample code that comes with the white papers. Just run the code in Visual Studio and look at the debug window for the error.

Has anyone come across a solution for this ? I am desperate

All Replies

Posted by Mike Ormerod on 20-Mar-2007 09:10

Hi

If I cast my mind back I believe what your seeing was due to an issue with the way Dynamic Datasets get passed across the wire to a .NET client, and there was a 'feature' due to proxygen where the constraint or index information was not being correctly passed back and forth. (This may have been fixed in later versions or a service pack, I'm not sure) The simplest solution would be to use static definitions for the datasets and .NET. If you want to see an example of how this is done still using the existing server gateway code etc that you have look at the AutoEdge example as this does exactly that. (http://www.psdn.com/library/kbcategory.jspa?categoryID=298).

I hope that helps.

Mike

Posted by zaphod on 20-Mar-2007 09:59

Thanks Mike for the reply.

I am using Openedge 10.1B by the way. No service packs available yet.

I have seen the Autoedge code.

I would have to generate progress procedure for every operation that the gateway exposes, for every dataset in the application.

I think it defeats the purpose of a single point of entry. Might as well go with proxies, which I don't want to do.

The documentation on using the OpenAPI for .NET is very thin, anyone know where I could find a more detailed set of documentation ?

Message was edited by:

zaphod

This thread is closed