KB IssueThere are different variants of this code. We will list them all here as they become available.
Sometimes the error is caused by misnaming your Parameter.
Issue DetailsYou 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 IssueTo 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 IssueExamples of the different types of Parameter errors.
Example#1:
We are querying an 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) Example #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 Field Length.
NewAssoc.Parameters.Append NewAssoc.CreateParameter("@SPPass", adVarChar, adParamInput, 25, SPID) Example #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, you do not have a default value of (getdate())
This will cause another error.
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@RevDate", adVarChar, adParamInput, 25,date()) Example #4:
If you misspell the parameter's 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.