Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameters..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,
I have a asp-page using a stored proc with a parameter:

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DNSName", "DNSUserName", "DNSPassword"
Set rs = Server.CreateObject("ADODB.Recordset")
set cmd = Server.CreateObject("ADODB.Command")

set p = cmd.Parameters
p.Append cmd.CreateParameter("@Name", 200, 1,64)
cmd.ActiveConnection = conn
cmd.CommandText = "spStoredProcedureName"
cmd.CommandType = 4
cmd.Parameters.Refresh
cmd("@Name") = Request.Form("Value")

set rs = cmd.Execute

But I get the following errormessage:
Object required: 'cmd'

The sp_procedure works from the SQL-Query Analyzer with the parameter.

What can be wrong?

/Kent J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top