When using Pro*COBOL with Oracle in Net Express it was possible to pass COBOL arrays as parameters to a stored procedure by using the EXEC SQL EXECUTE ...END-SQL construct. Pro*COBOL is not supported in a managed code environment so how can I still pass arrays as parameters to an Oracle stored procedure when using ADO.NET?
This is currently not supported directly using embedded EXEC SQL or EXEC ADO statements as these only work with generic ADO classes that are not bound to a particular database vendors product.
It is however supported by using the .NET Framework classes along with the Oracle Data Provider class Oracle.DataAccess as shown below. The source for the stored procedure appears after the sample program and it must be run using Oracle PL/SQL or some other tool before the application can be run.
The following is source code for a Visual COBOL 2010 managed console project: