Unable to execute Stored Procedure in VB.NET application via ODP.NET
834376Jan 26 2011 — edited Jan 26 2011I am having some issues while executing "Call" statement via ODP.NET driver for a VB.NET application. Earlier when i was using "Microsoft ODBC for Oracle" driver, i was able to execute the "Call" statement succesfully.
I am having a stored procedure, which is getting executed via "Call" statement in a VB.NET application. For e.g.
Dim dt as DataTable
Dim strSql as String = "{call dummy_stored_proc({resultset 2,op1,op2,op3,op4})}
Dim cn as New OracleConnection("Data Source=DS1;User Id=UID1;Password=PWD1;")
cn.Open()
Dim cmd as New OracleCommand(strSql)
cmd.Connection = cn
Dim da as New OracleDataAdapter(cmd)
da.fill(dt)
On executing the above dummy code, i get an Oracle exception *"ORA=009000", Invalid SQL Statement*. Could any one help me out in executing Stored procedures via "Call" statement via ODP.NET driver. I also tried executing via "Exec"/"Execute" statement, but still it gave the same exception.