Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resetting Paramter object
Message
 
 
To
13/06/2001 08:51:16
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00518797
Message ID:
00518830
Views:
16
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform