|
|
|
start date: Fri, 13 Jul 2007 13:12:04 -0700,
posted on: microsoft.public.dotnet.framework.adonet
back
| Thread Index |
|
1
Oleg
|
|
2
Matt Noonan
|
|
3
Oleg
|
EnterpriseLibrary. Return Recordset from oracle stored procedure
Hi,
I'm trying to use an EnterpriseLibrary 3.1 and return recordset from oracle
database using stored procedure.
As you may know, oracle stored procedures have out parameter of type cursor
in order to return a dataset.
It seems like I need to add a paramenter of type cursor to execute this
stored procedure, but I can't find the type for the cursor.
Does enterprise Library support this senario at all?
Thanks everybody,
Oleg
Date:Fri, 13 Jul 2007 13:12:04 -0700
Author:
|
Re: EnterpriseLibrary. Return Recordset from oracle stored procedure
Oleg wrote:
> Hi,
> I'm trying to use an EnterpriseLibrary 3.1 and return recordset from
> oracle database using stored procedure.
> As you may know, oracle stored procedures have out parameter of type
> cursor in order to return a dataset.
>
> It seems like I need to add a paramenter of type cursor to execute
> this stored procedure, but I can't find the type for the cursor.
>
> Does enterprise Library support this senario at all?
Yes, it is supported, but you don't have to add it. The Data block adds the
cursor for you when you call ExecuteDataSet. The only thing you have to do
is declare a "cur_out" (the default name) as the first parameter in your
stored procedure.
--
Matt Noonan
EasyObjects.NET: The O/RM for the Enterprise Library
http://www.easyobjects.net
Date:Sun, 15 Jul 2007 19:27:40 -0400
Author:
|
Re: EnterpriseLibrary. Return Recordset from oracle stored procedu
Thank you Matt.
I also found this information. Now I use a little of custom code to use any
name in cursor.
The idea is to create a cursor parameter yourself, then the Library will see
it and won't add default one:(cursor name is 'p_cur' in SP in subject)
<code>
db.AddOutParameter(dbCommand, "p_cur",DbType.Object, 8);
((OracleParameter)dbCommand.Parameters["p_cur"]).OracleType =
OracleType.Cursor;
</code>
"Matt Noonan" wrote:
> Oleg wrote:
> > Hi,
> > I'm trying to use an EnterpriseLibrary 3.1 and return recordset from
> > oracle database using stored procedure.
> > As you may know, oracle stored procedures have out parameter of type
> > cursor in order to return a dataset.
> >
> > It seems like I need to add a paramenter of type cursor to execute
> > this stored procedure, but I can't find the type for the cursor.
> >
> > Does enterprise Library support this senario at all?
>
> Yes, it is supported, but you don't have to add it. The Data block adds the
> cursor for you when you call ExecuteDataSet. The only thing you have to do
> is declare a "cur_out" (the default name) as the first parameter in your
> stored procedure.
>
> --
> Matt Noonan
> EasyObjects.NET: The O/RM for the Enterprise Library
> http://www.easyobjects.net
>
>
>
Date:Tue, 17 Jul 2007 11:42:01 -0700
Author:
|
|
|