SQL Server 2005 - [CreateParameter] - Generates Error (800a0bb9 - Arguments are of the wrong type)

Discussion in 'ASP General' started by news, Jul 11, 2009.

  1. news

    news Guest

    (Posting to: public.sqlserver & public.asp.general)
    Please someone help.
    I have ran out of options, nothing I try, and I have tried a lot.
    It is like everything that I through at my SQL Server 2005 Database gets
    thrown back at me.

    This is the [Error] that I am receiving.
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    ADODB.Command error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.
    test.asp, line 22
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    This is the code(s) that I have tried.
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Set sqlGal = Server.CreateObject("ADODB.Command")
    sqlGal.ActiveConnection=objConn
    sqlGal.Prepared = true
    sqlGal.CommandText = "SELECT GalID, MemID, GalName, GalPath, GalDate FROM
    Gal WHERE MemID=@MemID"
    sqlGal.Parameters.Append sqlGal.CreateParameter("@MemID", ad_Int,
    adParamInput, , sqlID) ' This line gets the error
    Set rsGal = CreateObject("ADODB.Recordset")
    set rsGal = sqlGal.execute
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    This is the other code that I have tried as well. (This was just a test
    script)
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    <%
    Set objCommand = Server.CreateObject("ADODB.Command")
    objCommand.ActiveConnection=objConn
    objCommand.Prepared = true
    With objCommand
    .CommandText = "usp_RecordsetAndOutputParams"
    .Parameters.Append .CreateParameter("@GalName", advarchar, adParamOutput,
    255) ' this line gets the same error.
    .Parameters.Append .CreateParameter("@GalPath", advarchar, adParamOutput,
    255)
    End With
    %>
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    Thanks in advance for any help.
    Wayne
    news, Jul 11, 2009
    #1
    1. Advertising

  2. news

    news Guest

    Figured this one out.
    Had to add in the CONST for the Parameters
    In this case was.

    const ad_Integer = 3
    const adParamInput = 1

    Have a good one all.
    news, Jul 11, 2009
    #2
    1. Advertising

  3. news wrote on Fri, 10 Jul 2009 21:41:23 -0400:

    > Figured this one out.
    > Had to add in the CONST for the Parameters
    > In this case was.


    > const ad_Integer = 3 const adParamInput = 1


    > Have a good one all.



    That still won't work with the code examples you gave, as you use ad_Int in
    the first one, not ad_Integer. There is an adovbs.inc file that you can
    include in your ASP that contains all the ADO constants, you'll find it in
    C:\Program Files\Common Files\System\ado

    --
    Dan
    Daniel Crichton, Jul 13, 2009
    #3
  4. news

    Bob Barrows Guest

    news wrote:
    > (Posting to: public.sqlserver & public.asp.general)
    > Please someone help.
    > I have ran out of options, nothing I try, and I have tried a lot.
    > It is like everything that I through at my SQL Server 2005 Database
    > gets thrown back at me.
    >
    > This is the [Error] that I am receiving.
    > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    > ADODB.Command error '800a0bb9'
    > Arguments are of the wrong type, are out of acceptable range, or are
    > in conflict with one another.
    > test.asp, line 22
    > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


    http://www.aspfaq.com/show.asp?id=2112

    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows, Jul 13, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    392
  2. DC
    Replies:
    1
    Views:
    324
    Tom B
    Sep 10, 2003
  3. Beau
    Replies:
    1
    Views:
    197
    Bob Barrows [MVP]
    Nov 29, 2004
  4. Replies:
    2
    Views:
    239
    Bullschmidt
    Oct 25, 2005
  5. Kevin Audleman

    Bizarre error in cmd.CreateParameter

    Kevin Audleman, Apr 18, 2006, in forum: ASP General
    Replies:
    11
    Views:
    325
    Aaron Bertrand [SQL Server MVP]
    May 1, 2006
Loading...

Share This Page