Oracle Cursor Parameters

Topics: Data Access Application Block
Jun 7, 2007 at 2:32 PM
In EntLib v1.1 (June 2005), I was able to apply Rob Edwards fix for specifying cursor names instead of using the default cur_OUT. I am now upgrading my project to use EntLib 3.1 (as well as ASP.NET 2.0) and need to support the same functionality.

Can someone help me out and tell me what modification I need to make to allow this? Or can I use the existing blocks as they are using the AddParameter or AddOutParameter functions? I've seen a few unanswered posts about this so hopefully this is just a need to add a function to the DAAB and recompile them.

Jun 7, 2007 at 4:56 PM
Using the default blocks, I did the following per another post on here. Created a static function in a _Common class in my BL like the following:

public static OracleParameter CreateCursorParameter(String cursorName)
OracleParameter orParam = new OracleParameter(cursorName, OracleType.Cursor, 0, ParameterDirection.Output, true, 0, 0, String.Empty, DataRowVersion.Default, Convert.DBNull);
return orParam;

Then called it in my BL like this:

Seems to work pretty good.