Home > Archive > Sybase ODBC > June 2005 > Stored Procedure using ASP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Stored Procedure using ASP
rip1870

2005-06-24, 8:23 pm

I have a ASP script that needs to execute a stored procedure.
--------------------------------
code:

set cm = server.CreateObject("ADODB.Command")
set rs = server.CreateObject("ADODB.Recordset")
cm.ActiveConnection = db
cm.CommandText = "getRecord"
cm.CommandType = adCmdStoredProc
cm.Parameters.Append = cm.CreateParameter("@id",3,1,,id)
set rs = cm.Execute
---------------------------------------------
Here is my Procedure:

ALTER PROCEDURE "rpatt"."getRecord"( IN @id integer )
RESULT( Company char )
BEGIN
SELECT *
FROM "dba"."Company"
WHERE "dba"."Company"."ID" = @id
END
------------------------------------------

when i try to run this page, i get:

Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

Any idea why i can't run this procedure? or any for that matter?

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com