Accessing the Adapter object's parameters and "out" parameter on a table adapter

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jlong_PGE
Posts: 2
Joined: Mon 07 May 2007 17:15

Accessing the Adapter object's parameters and "out" parameter on a table adapter

Post by jlong_PGE » Mon 07 May 2007 17:28

Hi,

Basically what I am trying to do is access the "out" parameter from a stored procedure. I am unable to find any information about how to do this via the dataset wizard so I started digging through code. I found this object in the dataset designer code:

private CoreLab.Oracle.OracleDataAdapter Adapter {
get {
if ((this._adapter == null)) {
this.InitAdapter();
}
return this._adapter;
}
}

The adapter object grants me everything I need since I can access the returned out parameter by going tableAdapterName.Adapter.UpdateCommand.Parameters["OUT"].value.ToString()
but only if I go into the designer code and change this object to public. This however gets overwritten if I make changes to the dataset via the wizard.

I need another way to access the parameters of the adapter, specifically the "out" parameter, or a way to permanently make the Adapter object public.

Anyone have any ideas?

Thanks!

jlong_PGE
Posts: 2
Joined: Mon 07 May 2007 17:15

Found a solution

Post by jlong_PGE » Mon 07 May 2007 20:36

Well I spent some more time messing around with this today and found a solution.

I created another partial class for the table adapter class and included a public variable that returned the private Adapter object. The dataset wizard does not over write this class so everything is good.

Thanks,

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 08 May 2007 07:58

Good decision.
Well done.

Post Reply