T
tshad
When I normally set up my Sql statements and parameters, I would normally
do:
Dim objCmd as New SqlCommand("AddNewResumeCoverTemplate",objConn)
objCmd.CommandType = CommandType.StoredProcedure
objCmd.parameters.add("@ClientID",SqldbType.VarChar,20).value =
session("ClientID")
objCmd.parameters.add("@Email",SqlDbType.VarChar,45).value =
session("Email")
I am setting up a class where I pass it the parameters and have seen it set
up like:
Dim parameters As SqlParameter () = { _
New SqlParameter("@ClientID",SqlDbType,varChar20), _
New SqlParameter("@Email",SqlDbType.varChar,45)}
parameters(0).value = session("ClientID")
parameters(1).value = session("Email")
Can I combine the 2, similar to the top as something like:
Dim parameters As SqlParameter () = { _
New SqlParameter("@ClientID",SqlDbType,varChar20).value =
Session("ClientID"), _
New SqlParameter("@Email",SqlDbType.varChar,45).value = Session("Email")}
Thanks,
Tom
do:
Dim objCmd as New SqlCommand("AddNewResumeCoverTemplate",objConn)
objCmd.CommandType = CommandType.StoredProcedure
objCmd.parameters.add("@ClientID",SqldbType.VarChar,20).value =
session("ClientID")
objCmd.parameters.add("@Email",SqlDbType.VarChar,45).value =
session("Email")
I am setting up a class where I pass it the parameters and have seen it set
up like:
Dim parameters As SqlParameter () = { _
New SqlParameter("@ClientID",SqlDbType,varChar20), _
New SqlParameter("@Email",SqlDbType.varChar,45)}
parameters(0).value = session("ClientID")
parameters(1).value = session("Email")
Can I combine the 2, similar to the top as something like:
Dim parameters As SqlParameter () = { _
New SqlParameter("@ClientID",SqlDbType,varChar20).value =
Session("ClientID"), _
New SqlParameter("@Email",SqlDbType.varChar,45).value = Session("Email")}
Thanks,
Tom