Hi
This error occurs because one of the parameters cannot be found in
the sp. Double check each parameter for spelling mistakes.
HTH
Chamindu R. Munasinghe, Software Engineer
Webitpro Division.
hSenid Software International (PVT) Ltd
Telephone: +94 - 11 - 4714501 Fax: +94 - 11 - 2673845
Web:www.hsenid.com
www.webitpro.com
Change Made Possible
**** DISCLAIMER *****
This e-mail and any attachments thereto are intended for the sole use of
the recipient(s) named above and may contain information that is
confidential and/or proprietary to the hSenid Software International
(Pvt.) Ltd. Any use of the information contained herein (including, but
not limited to, total or partial reproduction, communication, or
dissemination in any form) by persons other than the intended
recipient(s) is prohibited. If you have received this e-mail in error,
please notify the sender immediately and delete it.
-----Original Message-----
From: Ross St. Clair [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 12, 2004 4:41 AM
To: ASP Mailing List
Subject: [ASP] Stored Procedure Execution Problem
I'm getting a strange error while attempting to execute a stored
procedure via ADO. I can't figure it out for the life of me and I've
looked all over the place for a solution, but nothing has helped or
really applied to this situation. I'm hoping someone here has an
idea. The error I'm getting is "Item cannot be found in the
collection corresponding to the requested name or ordinal" and is
occurring on the line I marked in the code below. Is it possible
there is something in the stored procedure's code that is causing
this error? I didn't write the SP, but it works fine from Query
Analyzer. Thanks for your help!
-- Ross St. Clair
CODE:
-----
Set cmdCommitMetric = Server.CreateObject("ADODB.Command")
cmdCommitMetric.ActiveConnection = connMain
cmdCommitMetric.CommandText = "sp_MM_Alert_Insert"
cmdCommitMetric.CommandType = adCmdStoredProc
cmdCommitMetric.Parameters.Append
cmdCommitMetric.CreateParameter("@Name", adVarChar, adParamInput)
cmdCommitMetric.Parameters.Append
cmdCommitMetric.CreateParameter("@UMKey", adInteger, adParamInput)
cmdCommitMetric.Parameters.Append
cmdCommitMetric.CreateParameter("@CDays", adInteger, adParamInput)
cmdCommitMetric.Parameters.Append
cmdCommitMetric.CreateParameter("@WDays", adInteger, adParamInput)
cmdCommitMetric.Parameters.Append
cmdCommitMetric.CreateParameter("@NDays", adInteger, adParamInput)
cmdCommitMetric.Parameters.Append
cmdCommitMetric.CreateParameter("@Flg", adVarChar, adParamInput)
cmdCommitMetric.Parameters("@Name").Value = sAlertName
cmdCommitMetric.Parameters("@UMKey").Value = CLng(sUserMetricKey)
cmdCommitMetric.Parameters("@CDays").Value = lCriticalAlertDays
cmdCommitMetric.Parameters("@WDays").Value = lWarningAlertDays
cmdCommitMetric.Parameters("@NDays").Value = lNormalAlertDays
cmdCommitMetric.Parameters("@Flg").Value = sAlertEnabled
Set rsCommitMetric = cmdCommitMetric.Execute
^^^ ERROR OCCURS AS A RESULT OF THIS LINE ^^^
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/