Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB.Command error '800a0bb9'

Status
Not open for further replies.

itsmarkdavies

Programmer
May 22, 2001
87
GB
I am running a SQL Server Stored Procedure from ASP including 1 input parameter and 1 output parameter, but I keep getting the error "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.". I can`t seem to find the error in my code (see below). Any ideas ? Thanks.

CODE :-

Dim ADOconn
Dim strConn
Dim ADOcommand
Dim SPstring
Dim DESC
Dim BRAND
Dim WebInclude
Dim rs
Dim answer
Dim Increase

Increase = Request.Form("txtAMOUNT")

Set ADOconn = Server.CreateObject("ADODB.Connection")
strConn = "DSN=SQLWEBTEST;DATABASE=MARKD;UID=sa;PWD=;"

ADOconn.Open strConn

Set ADOcommand = Server.CreateObject("ADODB.Command")
Set ADOcommand.ActiveConnection = ADOconn

ADOcommand.CommandText = "UpdateSalaries2"
ADOcommand.CommandType = 4

ADOcommand.Parameters.Append ADOcommand.CreateParameter("paramAMOUNT", adNumeric, adParamInput, , 10000)
ADOcommand.Parameters.Append ADOcommand.CreateParameter("paramRESULT", adVarChar, adParamOutput, 1)

ADOcommand.Execute

answer = ADOcommand.Parameters("paramRESULT").Value
ADOcommand.CommandTimeout = 300


Mark Davies
itsmarkdavies@hotmail.com
itsmarkdavies@hotmail.com
 
ADOcommand.Parameters.Append ADOcommand.CreateParameter("@paramAMOUNT", adNumeric, adParamInput, , 10000)
ADOcommand.Parameters.Append ADOcommand.CreateParameter("@paramRESULT", adVarChar, adParamOutput, 1)
ADOCommand("@paramAMOUNT") = Increase
ADOCommand.Execute

Note the "@" in the naming of the params and setting the
@paramAmount value prior to execution
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top