Try this:
Public Sub ClearParameters(objCmd As ADODB.Command)
Dim i As Integer
With objCmd
For i = (.Parameters.Count - 1) To 0 Step -1
.Parameters.Delete (i)
Next i
End With
End Sub
HTH,
John Barone
>I use the Parameter object when sending values to a SQL Server stored procedure. Many times after doing the proper appends and calling the stored procedure and getting back my results, I want to create another parameters collection (fresh) so I can call another different stored procedure. Unfortunately it doesn't work because I have not cleared out the first set of parameter values already included in it from the first stored procedure call and I don't know the property or command to reset (clear out) the parameter collection.