>-----Original Message-----
>
[quoted text clipped - 20 lines]
>Have you tried changing the Value property of each Parameter in the Parameters collection and then
>executing the command?
Do you mean this:
With cmdTest
.Parameters.Item(0).Value = ...
.Parameters.Item(1).Value = ...
.Execute
End With
Thank you,
Jennifer
>Paul ~~~ pclement@ameritech.net
>Microsoft MVP (Visual Basic)
>.
Paul Clement - 31 Jan 2005 19:43 GMT
¤
¤ >-----Original Message-----
¤ >On Mon, 31 Jan 2005 09:54:27 -0800, "JLFleming"
¤ >
¤ >¤
¤ >¤ I have a stored procedure I want to run several times
¤ in
¤ >¤ the same routine. Below is how I am calling the
¤ stored
¤ >¤ procedure.
¤ >¤
¤ >¤ How can I run the stored procedure the second time
¤ with
¤ >¤ new parameters? The way I am doing it is setting the
¤ >¤ cmdTest = Nothing and then recreating it.
¤ >¤
¤ >¤ Is there a better way to do it?
¤ >¤
¤ >¤ With cmdTest
¤ >¤ .ActiveConnectin dbcon
¤ >¤ .CommandType = adCmdStoredProc
¤ >¤ .CommandText = "stored_Proc"
¤ >¤ .Parameters.Append .CreateParameter(...)
¤ >¤ .Parameters.Append .CreateParameter(...)
¤ >¤ .Execute
¤ >¤ End With
¤ >
¤ >Have you tried changing the Value property of each
¤ Parameter in the Parameters collection and then
¤ >executing the command?
¤
¤ Do you mean this:
¤ With cmdTest
¤ .Parameters.Item(0).Value = ...
¤ .Parameters.Item(1).Value = ...
¤ .Execute
¤ End With
¤
¤ Thank you,
¤ Jennifer
Yes I did.
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)