We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

anyone know why this is failing?......RSS

2 replies

Last post Sep 26, 2005 09:45 AM by threeo

  • anyone know why this is failing?......

    Sep 23, 2005 11:34 AM|threeo|LINK

    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
  • Re: anyone know why this is failing?......

    Sep 23, 2005 03:12 PM|jeff@zina.com|LINK

    Have you Binged a solution before posting?
  • Re: anyone know why this is failing?......

    Sep 26, 2005 09:45 AM|threeo|LINK

    jeff,

    thank you. you saved me a lot of time and headache.
    everything works fine now.

    threeo