Retrieving Oracle Procedures ResultSet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use fill a table using DataAdapter::Fill with a Oracle
procedure or function result.
When I call a SP (with a simple select query) from SQLServer I don't put
return value on the Command's Parameters. There's any way to do the same with
Oracle database, but without passing the Cursor Output datatype.

Thanks in advance,
José Tavares
 
If I understand you correctly, you are talking about the RETURN_VALUE, which
is an ADO/SQL Server created parameter for every stored procedure. If so, you
are correct. There is no facility in Oracle to do the same thing.

Realistically, however, the SQL Server automatic parameter (RETURN_VALUE)
should be used like a return value in C++ (ie, to indicate success or failure
and optionally, an error code (numeric)). It should not be used as an output
parameter for work you are doing in a sproc.

In Oracle, with the MS OracleClient namespace (which bombs under 10g, from
my understanding), you have two choices.

1. Feed an output or inputoutput parameter and fill in the sproc
2. Use a REF_CURSOR, which becomes a recordset in ADO.NET (either a
DataTable in a DataSet or a DataReader).

You can get a bit more flexibility with ODP.NET, which can be downloaded
from Oracle TechNet (http://otn.oracle.com).

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top