dataBase.AddParameter(cmd, "pcur", OracleType.Cursor, 100, ParameterDirection.Output, true, byte.MaxValue, byte.MaxValue, String.Empty, DataRowVersion.Default, Convert.DBNull);
调用oracle存储过程时参数个数或类型错误? -相关资料
精选 转载 Data Access Application Block: Default Oracle cursor cur_OUT
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
//记录集游标参数的输入pcur
dataBase.AddParameter(cmd, "pcur", OracleType.Cursor, 100, ParameterDirection.Output, true, byte.MaxValue, byte.MaxValue, String.Empty, DataRowVersion.Default, Convert.DBNull);
dataBase.AddParameter(cmd, "pcur", OracleType.Cursor, 100, ParameterDirection.Output, true, byte.MaxValue, byte.MaxValue, String.Empty, DataRowVersion.Default, Convert.DBNull);
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
python参数个数 python 参数
Python函数参数 Python中的函数参数主要有:无参数、位置参数、命名参数(关键字参数)、默认参数和可变参数(tuple型和dic型参数)。 1、无参数 无参数的Python函数一般只用来完成一些简单的功能。 2、位置
python参数个数 python 函数参数 args kwargs
















