Hello all
I have 4 stored procedures that each require a multitude on input parameters.
I am feeding these in through a form in VB as follows:
cmd.CommandText = "sp1"
cmd.CommandType = adCmdStoredProc
Set prmNTAddedBy = cmd.CreateParameter("NTAddedBy", adVarChar, adParamInput, 50, Me.Name)
cmd.Parameters.Append prmNTAddedBy
etc...
Set rst = cmd.Execute
This is obviously repeated for all of the fields, and all of the stored procedures.
My problem is that these parameters from the form are inputted into each stores procedure, so essentially, I am repeating about 40 lines of code 4 times!
My question is this. Is there a way to grab the parameters in VB, and just feed them into all 4 stored procedures one after another?
Cheers in advance!
J
I have 4 stored procedures that each require a multitude on input parameters.
I am feeding these in through a form in VB as follows:
cmd.CommandText = "sp1"
cmd.CommandType = adCmdStoredProc
Set prmNTAddedBy = cmd.CreateParameter("NTAddedBy", adVarChar, adParamInput, 50, Me.Name)
cmd.Parameters.Append prmNTAddedBy
etc...
Set rst = cmd.Execute
This is obviously repeated for all of the fields, and all of the stored procedures.
My problem is that these parameters from the form are inputted into each stores procedure, so essentially, I am repeating about 40 lines of code 4 times!
My question is this. Is there a way to grab the parameters in VB, and just feed them into all 4 stored procedures one after another?
Cheers in advance!
J