Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameters Array

Status
Not open for further replies.

BG12424

Programmer
Jun 4, 2002
717
US
I would like to encapsulate the executution of a stored procedure with parameters into a method. This method would then return an OracleDataReader to the caller. In order to accomplish this and make is somewhat dynamic, how could I pass an array of parameters and have the parameters used as part of the stored procedure that is being fired off?

Thanks


regards,
Brian
 
Does anyone have any ideas on this? Thanks

The non-techy pseudo code is something like below

function DataReaderFunct(params) as datareader

open db conn
create datareader
create command object
AddParameters(params)
executenonquery
return datareader

end function

function AddParameters(params) as ListofParameters
for each parm in params
command.parameter = new parameter parm
next parm
return parameter

end function



regards,
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top