【发布时间】:2013-09-02 07:20:58
【问题描述】:
如何在 ODBC 参数类型中声明 SYS_REFCURSOR 的类型?
这是我的代码:
OdbcParameterCollection oParam = new OdbcCommand().Parameters;
oParam.Add("Username ", OdbcType.NVarChar).Value = "Aries";
oParam.Add("PASSWORD ", OdbcType.NVarChar).Value = "1234";
oParam.Add("RESULT", OdbcType.??).Direction = ParameterDirection.Output; //Problem here
_dt = this.Execute("{ CALL spValidateLogin(?, ?, ?) }", oParam);
【问题讨论】:
-
不传参数类型怎么办?创建只有名称和方向的参数。然后,对 Oracle 使用这种类型的连接是不可取的。您应该为此使用 ODP.Net
标签: c# oracle stored-procedures odbc oracle-sqldeveloper