ADODB.Parameter error '800a0d5d'

Posted on 2007-10-09
Last Modified: 2008-01-09
I have the following stored procedure and beloow it I have a piece of the ASP file that calls it.
This is the error I get:
ADODB.Parameter error '800a0d5d'

Application uses a value of the wrong type for the current operation.

/pp/processTRequest.asp, line 62

ALTER PROCEDURE [dbo].[sp_insUserInfo]
      -- Parameters for 'tbl_user'
      @personnel_id int,
      @fname varchar(50),
      @lname varchar(50),
      @username varchar(50),
      @pwd varchar(50),
      @role_ID int,
      @email_addr varchar(70)
      DECLARE @dte_added datetime

      -- SET NOCOUNT ON added to prevent extra result sets from
      -- interfering with SELECT statements.

      SET @dte_added = GETDATE()

      INSERT INTO tbl_user(personnel_id,fname,lname,username,pwd,role_id,email_addr,dte_added) VALUES(@personnel_id,@fname,@lname,@username,@pwd,@role_ID,@email_addr,@dte_added)            
      --return SCOPE_IDENTITY()

'Stored Procedure - sp_insUserInfo
    Set cmd = server.CreateObject("ADODB.Command")
    WITH cmd
      .ActiveConnection = Conn
      .CommandText = "sp_insUserInfo"
      .CommandType = adCmdStoredProc
      .Parameters(1).Value = session("pid")
      .Parameters(2).Value = session("firstname")
      .Parameters(3).Value = session("lastname")
      .Parameters(4).Value = session("username")
      .Parameters(5).Value = session("password")
      .Parameters(6).Value = session("roleID")
      .Parameters(7).Value = session("email")        <--  Line 62

When I take out line 62 and comment it out of my SP, I don't get an error.
what am I doing wrong?
Question by:Isaac
    LVL 20

    Expert Comment

    LVL 12

    Accepted Solution

    You didn't show definition of your ADO Parameter object. If you define it somewhere check its ADO datatype. If you don't define it you should do it because without definition of datatype it will be "infered" from value and so can be wrong.

    Create new Parameter object wioth strict definition.


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now