The managed provider for Oracle requires you to eXPlicitly bind your reference cursor in your parameter collection. This means you must explicitly create an output parameter for the cursor in your application code. However, that code will not be portable with database systems that do not require a parameter for the cursor. The OracleDatabase allows you to create commands without specifying a cursor. It will create a cursor, named cur_OUT, for commands that execute a stored procedure and do not include an output parameter for the cursor. This means that you can name your reference cursor as "cur_OUT" and the Data Access Application Block will bind it for you; you do not need to explicitly create an output parameter for the cursor. If your stored procedures use a cursor with a name other than "cur_OUT," you must explicitly add a parameter for each cursor to the command. Similarly, if your stored procedure contains multiple cursors, you must explicitly add each cursor parameter to the command.
Procedure STATIC_USER_SelectAll ( cur_OUT_f OUT T_OUT, cur_OUT_g OUT T_OUT) AS Begin OPEN cur_OUT_f FOR Select * from STATIC_USER; OPEN cur_OUT_g FOR Select * from STATIC_ROLE; End;
Procedure STATIC_USER_SelectAll ( cur_OUT_f OUT T_OUT, cur_OUT_g OUT T_OUT) AS Begin OPEN cur_OUT_f FOR Select * from STATIC_USER; OPEN cur_OUT_g FOR Select * from STATIC_ROLE; End;
Procedure STATIC_USER_SelectAll ( cur_OUT_f OUT T_OUT, cur_OUT_g OUT T_OUT) AS Begin OPEN cur_OUT_f FOR Select * from STATIC_USER; OPEN cur_OUT_g FOR Select * from STATIC_ROLE; End; 代码如下: