Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2005, 12:25 PM
Authorized User
 
Join Date: Jun 2005
Posts: 42
Thanks: 0
Thanked 1 Time in 1 Post
Default ADODB.Command error '800a0bb9'

Hi there,

I'm executing a stored procedure from an ASP page. However, I keep getting this error:

ADODB.Command error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

The SP consists of inserting a record. I have tried everything and I haven't got a solution.

Can someone help me on this?


arnniema
__________________
arnniema
 
Old September 26th, 2005, 03:12 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii arnniema!!

Can you provide the code and parameters you are using.


Cheers :)

vinod
 
Old September 26th, 2005, 09:36 AM
Authorized User
 
Join Date: Jun 2005
Posts: 42
Thanks: 0
Thanked 1 Time in 1 Post
Default

Set cmdInsert = server.CreateObject("ADODB.Command")
      cmdInsert.ActiveConnection = cnn1 '1 - Connection
      cmdInsert.CommandText = "TestAddPO" '2 - storedprocedure name
      cmdInsert.CommandType = 4 '3 - type of command "4=adCmdStoredProc"


        '******************************************
        'Parameter1: Center Id
        .parameters.append .CreateParameter("@CenterId", adInteger, adParaminput, 4, CenterId)
        'Parameter2: Division Id
        .parameters.append .CreateParameter("@DivisionId", adInteger, adParaminput, 4, DivisionId)
        'Parameter3: Program Id
        .parameters.append .CreateParameter("@ProgramId", adInteger, adParaminput, 4, ProgramId)
         'Parameter4: Performance Objective Description
        .parameters.append .CreateParameter("@PerformanceObjDescription", adVarChar, adParaminput, 1000, PerformanceObjDescription)
        'Parameter5: Person Responsible
        .parameters.append .CreateParameter("@OwnerId", adInteger, adParaminput, 4, OwnerId)
        'Parameter6: Strategy Id
        .parameters.append .CreateParameter("@StrategyId", adInteger, adParaminput, 4, StrategyId)
         'Parameter7: Status Id
        .parameters.append .CreateParameter("@StatusId", adInteger, adParaminput, 4, StatusId)
        'Parameter8: Status Comment
        .parameters.append .CreateParameter("@StatusComment", adVarChar, adParaminput, 1000, StatusComment)
        'Parameter9: Target Goal
        .parameters.append .CreateParameter("@TargetGoal", adDouble, adParaminput, 8, TargetGoal)
        'Parameter10: Target Goal Metric
        .parameters.append .CreateParameter("@TargetGoalMetricType", adChar, adParaminput, 1, TargetGoalMetricType)
            'Parameter11: Target Goal Rate
        .parameters.append .CreateParameter("@Rate", adVarChar, adParaminput, 100, Rate)
        'Parameter12: Stretch Goal
        .parameters.append .CreateParameter("@StretchGoal", adDouble, adParaminput, 8, StretchGoal)
        'Parameter13: State Average
        .parameters.append .CreateParameter("@StateAverage", adDouble, adParaminput, 8, StateAverage)
        'Parameter14: Best County Number
        .parameters.append .CreateParameter("@BestCountyN0", adDouble, adParaminput, 8, BestCountyN0)
        'Parameter15: Best County Name
        .parameters.append .CreateParameter("@BestCountyId", adInteger, adParaminput, 4, BestCountyId)
        'Parameter16: Date Submitted
        .parameters.append .CreateParameter("@DateSubmitted", adDate, adParaminput, 4, DateSubmitted)
        'Parameter17: Date Last Reviewed
        .parameters.append .CreateParameter("@DateLastReviewed", adDate, adParaminput, 4, DateLastReviewed)
        'Parameter18: Date Estimated Completion
        .parameters.append .CreateParameter("@DateEstimatedCompletion", adDate, adParaminput, 4, DateEstimatedCompletion)
        'Parameter19: ScoreCard Id
        .parameters.append .CreateParameter("@ScorecardId", adInteger, adParaminput, 4, ScorecardId)
        'Parameter20: Make Official
        .parameters.append .CreateParameter("@MakeOfficial", adTinyInt, adParaminput, 1, MakeOfficial)
        'Parameter21: Performance Objective Id
        .parameters.append .CreateParameter("@PerformanceObjectiveId", adInteger, adParamOutput, 4, PerformanceObjectiveId)
        'Parameter0: stored procedure's return value
        .parameters.append .CreateParameter ("RETURN_VALUE", adInteger, adParamReturnValue)
        '******************************************
        'Run the storedprocedure
        .execute lngRecs, , adexecutenorecords
        '******************************************
        'Extract the return value
        lngAdded = .parameters("RETURN_VALUE")
        '******************************************

arnniema





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error '800a0bb9' - PLEASE HELP! gmoney060 BOOK: Beginning ASP 3.0 3 April 25th, 2007 09:21 PM
ADODB.Recordset error '800a0bb9' Thamil Classic ASP Basics 3 October 5th, 2006 04:01 AM
ADODB.Command error '800a0d5d' Karl Downing Classic ASP Databases 1 April 22nd, 2005 03:54 AM
ADODB.Recordset error '800a0bb9' Line 24 rossdunbar Dreamweaver (all versions) 3 August 2nd, 2004 10:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.