CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • ADODB.Parameters error '800a0e7c' Parameter object is improperly defined

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    8
  • Date Created
    Sunday, September 26, 2010
  • Last Updated
    Wednesday, December 15, 2021
  • This Article Has been Viewed
    19537 times
  • Short Desc
    There are different variants of this code. We will list them all here as they become available.

    Sometimes the error refers to misnaming your Parameter.
  • Details
    You may receive this error if you run your script with a misnamed parameter.

     
    ADODB.Parameters error '800a0e7c'
    Parameter object is improperly defined. Inconsistent or incomplete information was provided.
    Script.asp, line 10
  • Recreate Issue
    To recreate this issue, misname your parameters.
    Change
    adInteger
    to
    adVarChar
    (or)
    Vise-Versa

    This will also happen if you misspell the parameters name:
    Intger
    should be
    Integer
  • Resolve Issue
    Examples of the different types of Parameter errors.

    #1:
    Example, we are Quering a ID (MemID) of DataType Integer


    <%
    sqlMyGalCount.Parameters.Append sqlMyGalCount.CreateParameter("@MemID", adVarChar,adParamInput, , sqlID)
    %>


    As you can see above, we have set its data type as adVarChar
    Thus causing the error.
    To fix this, change adVarChar to adInteger


    <%
    sqlMyGalCount.Parameters.Append sqlMyGalCount.CreateParameter("@MemID", adInteger,adParamInput, , sqlID)
    %>



    #2:
    If you are using a Field of DataType = VarChar

    <%
    NewAssoc.Parameters.Append NewAssoc.CreateParameter("@SPPass", adVarChar, adParamInput,, SPID)
    %>



    As you can tell, you are missing the Length of the Field.

    <%
    NewAssoc.Parameters.Append NewAssoc.CreateParameter("@SPPass", adVarChar, adParamInput, 25, SPID)
    %>



    #3:
    If you are using a Field of DataType = DateTime

    <%
    sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@RevDate", adDatetime, adParamInput, ,date())
    %>


    Try changing the adDateTime to adVarChar.
    Make sure that within your Table Column that you do not have a default value of (getdate())
    This will cause another error.

    <%
    sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@RevDate", adVarChar, adParamInput, 25,date())
    %>


    #4:
    If you misspell the Parameters name, you will also get this error.
    So if we have:

    <%
    sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@MyID", adIntger, adParamInput, ,getMyID)
    %>

    In the above, we have misspelled the Parameter Name adIntger

    <%
    sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@MyID", adInteger, adParamInput, ,getMyID)
    %>

    The above is spelled correctly.


    This will allow for the insert to happen.