locked
anyone know why this is failing?...... RRS feed

  • Question

  • User-511995934 posted
    i have a very simple stored procedure which accepts one input and should return a recordset

    here it is:

    CREATE PROCEDURE sp_GetBOM
    @strBOMid varchar(50)
    AS
    SELECT * FROM  TECHNICAL_SPEC_ALPHANUM
    WHERE     ID = @strBOMid
    GO

    and i'm trying to call it from asp like so:
     Dim cmd 
    Set cmd = Server.CreateObject("ADODB.Command")
    cmd.ActiveConnection = GetDBConnection()
    cmd.CommandText = "sp_GetBOM"

    but it always blows up on the following line:

    cmd.CommandType = adCmdStoredProc cmd.Parameters.append cmd.CreateParameter("@strBOMid",adVarChar,adParamInput,50,"12632-04")

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

    threeo
    Friday, September 23, 2005 11:34 AM

All replies