For i = 1 to cmd.Parameters.Count
    cmd.Parameters.Delete 0
Next

If on each loop your parameters are the same but different values, just set
the values for each loop.  Don't waste resources by deleting parameters if
you don't have to.


David L. Penton, Microsoft MVP
JCPenney Application Specialist / Lead
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach"
[EMAIL PROTECTED]

Do you have the VBScript Docs or SQL BOL installed?  If not, why not?
VBScript Docs: http://www.davidpenton.com/vbscript
SQL BOL: http://www.davidpenton.com/sqlbol


-----Original Message-----
From: Nick Middleweek [mailto:[EMAIL PROTECTED]]

There's a Delete Method for the Parameters Object, works well.

http://www.devguru.com/Technologies/ado/quickref/command_parameterscollectio
n.html


HTH,
Nick

--------------------------
Nick Middleweek
Web Applications Developer
Tel: +44(0)1525 375 778
Mob: +44(0)774 035 5424
[EMAIL PROTECTED]


:> -----Original Message-----
:> What is the best way of clearing the parameters each loop?  I am
:> currently
:> set the oCmd object to nothing and recreating it each loop, but
:> I know this
:> is not the best way of doing it!
:>
:> Thanks,
:>
:> Dan


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to