Cheers! That will do the job nicely!!

-----Original Message-----
From: Scott [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 13:26
To: ActiveServerPages
Subject: Re: Clearing SP parameters


hey Daniel

I have a little sub in my global file that might do the trick?

sub ClearCmdParams(ACmd)
  do until ACmd.Parameters.Count = 0
    ACmd.Parameters.Delete(ACmd.Parameters.Count-1)
  loop
end sub

cheers


----- Original Message -----
From: "Daniel Field" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 9:25 PM
Subject: Clearing SP parameters


: Hi All,
:
: I have a script that loops through a recordset calling a Stored Procedure
: each time like:
:
:
: Set oCmd = CreateObject("ADODB.Command")
: oCmd.CommandType = &H0004
: oCmd.CommandText = "MY STORE PROCEDURE"
: oCmd.ActiveConnection = myconnection
:
:
: Do while [statement]
:
: oCmd.Parameters.Append
:
oCmd.CreateParameter("@fullXML",adLongVarChar,adParamInput,Len(fullXML)+1,fu
: llXML)
:
: oCmd.Execute ,,adExecuteNoRecords
:
: Loop
:
: 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
:
:
:
: _____________________________________________________________________
: This e-mail has been scanned for viruses by the WorldCom Internet Managed
Scanning Service - powered by MessageLabs. For further information visit
http://www.worldcom.com
:
: ---
: You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
: To unsubscribe send a blank email to
%%email.unsub%%
:



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

_____________________________________________________________________
This e-mail has been scanned for viruses by the WorldCom Internet Managed
Scanning Service - powered by MessageLabs. For further information visit
http://www.worldcom.com



_____________________________________________________________________
This e-mail has been scanned for viruses by the WorldCom Internet Managed Scanning 
Service - powered by MessageLabs. For further information visit http://www.worldcom.com

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

Reply via email to