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.
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.