I want to create a generic data layer that uses Oracle as the back end. By
generic, I just want a couple of procedures. All access will be done with
stored procs, and I want one that returns a dataset and one that returns a
datareader. I want to pass in the commandName, and a ParameterArray that
holds the parameters I want to populate:
Public Shared Function ExeCmd(ByVal CommandName As String, ByVal CmdParam as
OracleParameter Collection) as DataSet
Using z as new OracleCommand
with x
.CommandType = StoredProc
.CommandText = CommandName
'I want to iterate through the parameter collection and add
each parameter here
end with
End Using
End Function
How can I apply the ParameterCollec tion to the command?
John
generic, I just want a couple of procedures. All access will be done with
stored procs, and I want one that returns a dataset and one that returns a
datareader. I want to pass in the commandName, and a ParameterArray that
holds the parameters I want to populate:
Public Shared Function ExeCmd(ByVal CommandName As String, ByVal CmdParam as
OracleParameter Collection) as DataSet
Using z as new OracleCommand
with x
.CommandType = StoredProc
.CommandText = CommandName
'I want to iterate through the parameter collection and add
each parameter here
end with
End Using
End Function
How can I apply the ParameterCollec tion to the command?
John
Comment