G
Guest
Hi,
I have an idea but I need some help. Basically I want to create an object
that is used to communicate between the front end of my application and the
database. This object will be used by my data layer to execute stored
procedures on the database. It will receve such parameters such as:
string StoredProcedureName, string UserName, string TransactionType and one
more which would be a collection of some sort. I would send this object to
send it an object that holds the parameters for the stored procedure so it
can walk this object to create a SqlCommand object and execute the stored
procedure.
The problem is that how do I create a multi demencial array where the first
column has a type of string and is called ParameterName, the 2nd column has a
type of System.Data.SqlClient.SqlDbType and be called ParameterDataType, and
the 3rd should be of type varient or object since and be called
ParameterValue.
The point of all this is to allow the business layer of the app to send the
name of the proc and the parameters object to the data layer and the data
layer can walk the parameter object and convert it to an SqlCommnad and
execute a stored procedure.
I think creating a custom collection may help but I have never used a
collection and it seems that I can only have one dimension in a collection or
a name value pair.
Any ideas?
Thanks
KP
I have an idea but I need some help. Basically I want to create an object
that is used to communicate between the front end of my application and the
database. This object will be used by my data layer to execute stored
procedures on the database. It will receve such parameters such as:
string StoredProcedureName, string UserName, string TransactionType and one
more which would be a collection of some sort. I would send this object to
send it an object that holds the parameters for the stored procedure so it
can walk this object to create a SqlCommand object and execute the stored
procedure.
The problem is that how do I create a multi demencial array where the first
column has a type of string and is called ParameterName, the 2nd column has a
type of System.Data.SqlClient.SqlDbType and be called ParameterDataType, and
the 3rd should be of type varient or object since and be called
ParameterValue.
The point of all this is to allow the business layer of the app to send the
name of the proc and the parameters object to the data layer and the data
layer can walk the parameter object and convert it to an SqlCommnad and
execute a stored procedure.
I think creating a custom collection may help but I have never used a
collection and it seems that I can only have one dimension in a collection or
a name value pair.
Any ideas?
Thanks
KP