Page 1 of 1

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

Posted: Mon 07 May 2007 17:28
by jlong_PGE
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!

Found a solution

Posted: Mon 07 May 2007 20:36
by jlong_PGE
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,

Posted: Tue 08 May 2007 07:58
by Alexey
Good decision.
Well done.