C # read Oracle stored procedure record set error solution

xiaoxiao2021-03-06  59

Returning to the Oracle stored procedure in C # If the name of the parameter in the program and the name of the Oracle stored procedure output parameter are different, the unprocessed "System.Data.OracleClient.OracleException" type will appear. The appearance in System.Data.dll.

Additional Information: ORA-06550: Line 1, Column 7: PLS-00306: Wrong Number Or Types of Arguments in call to 'Alltest1'ora-06550: Line 1, Column 7: PL / SQL: Statement IGNORED solutions as follows: Modify The name of the output parameter during the store is consistent with the input parameter name generated in the program, or the name of the output parameter in the program can modify the name of the output parameter in the program, so that the names in the Oracle store are consistent. In addition: Closing the cursor without manual, Open Mycursor for select * from table; Oracle will automatically close the cursor. The following program code is: 1. Packet Code create or replace package demois type curDemo is ref Cursor; procedure getDemo (userCurDemo out demo.curDemo); end demo; create or replace package body demoas procedure getDemo (userCurDemo out demo.curDemo) is Begin Open Usercurdemo for SELECT SSN, FNAME, LNAME from Person; End Demo;

转载请注明原文地址:https://www.9cbs.com/read-90309.html

New Post(0)