Reputation: 27
How I'll declare the type of SYS_REFCURSOR in ODBC parameter type?
Here's my code:
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);
Upvotes: 0
Views: 856
Reputation: 19376
The real answer is - you've selected wrong connectivity for Oracle. You may be just limited to Text execution with odbcCommand because I don't see OdbcType having any of that.
OleDb will be discontinued and it is not advisable to use. So, you have MS Data Provider for Oracle
http://msdn.microsoft.com/en-us/library/a6cd7c08.aspx
But even Microsoft recommends using vendor-provided data connectivity for .NET. In which case you need to install ODP.NET
http://msdn.microsoft.com/en-us/data/dd363565.aspx
Upvotes: 1