I have a question about the dotconnect/devart Enterprise Library concerning accessing/executing a stored procedure where one of the parmeter is an out-parameter of sys_refcursor --> see oracle procedure header below
Code: Select all
PROCEDURE SELECT_SECTION_BY_ID (p_Section_ID IN NUMBER, p_ResultSet OUT sys_refcursor)
In my first app I used the direct dotconnect objects (connection, parameter, OracleCursor, OracleReader) which works fine.
But how do you do the same with the Enterprise Library
I now have
Code: Select all
Dim tmpDatabase As Devart.Data.Oracle.EnterpriseLibrary.OracleDatabase = Nothing
Dim tmpConnection As Data.Oracle.OracleConnection = Nothing
If tmpDatabase Is Nothing Then
tmpDatabase = DatabaseFactory.CreateDatabase()
tmpConnection = tmpDatabase.CreateConnection()
End If
Dim _oracleCommand As Devart.Data.Oracle.OracleCommand = tmpDatabase.GetStoredProcCommand("SADERP_ADMIN.PCK_PG_SECTION.SELECT_SECTION_BY_ID")
tmpDatabase.AddInParameter(_oracleCommand, "p_Section_ID", System.Data.DbType.Int32, 100)
[b]tmpDatabase.AddOutParameter(_oracleCommand, "p_ResultSet", OracleDbType.Cursor, Nothing)[/b]
and how te retrieve the cursor afterwards (via ExecuteNonQuery -> parameters -> GetDataReader)
thx
Fred