In the case of MSFT SQL Server 08, it is:
odbcCommand = new OdbcCommand("{call " + SP_NAME + " (?,?,?,?,?,?,?) }", odbcConn);
When I try to do the same thing for Oracle, I get:
OdbcException: ERROR [HYC00] [Oracle][ODBC]Optional feature not implemented.
Feel free to ask for clarification, and please help. I am using .Net 3.5, SQL Server 08, and Oracle 11g_home1.
P.S. The Oracle stored procedure does have some 3 more parameters, but I believe I am handling this in my code.
I’m running .NET 3.5 and Oracle 10gR2. I’ve added an output parameter in response to your comment.
Server,Uid, andPwdhave been changed to protect the innocent. Set them to appropriate values.My stored procedure:
My test code:
When using
OUTorIN OUTparameters, theSizeproperty of theOdbcParametermust be set to an adequate value.In response to your comment regarding exception handling, I would have the caller of the data access method handle exceptions. With the
usingconstruct, theDisposemethod will be called automatically on the command and connection objects whether there is an exception or not.