[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


ADODB.Parameter error '800a0d5d'

Posted on 2007-10-09
Medium Priority
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 12

Accepted Solution

patrikt earned 750 total points
ID: 20042248
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

834 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