• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Getting a 800a0bb9 error when I call a stored procedure

I am trying to run a stored procedure from my ASP page and get the following error

ADODB.Command error '800a0bb9'

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

Projectabc/LoginValidate.asp, line 20

Line 20 is the line that goes "Set ObjParam1=......"

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
UserName = Request("UserName")
Password = Request("Password")

Set myRS=Server.CreateObject("ADODB.Recordset")
Set ObjCmd = Server.CreateObject ("ADODB.Command")
Set StrConn=Server.CreateObject("ADODB.Connection")
DText="Provider=SQLOLEDB;Server=strServer;Initial Catalog=strCat;User ID=User;Password=abc"
StrConn.Open Dtext

objCmd.ActiveConnection=strConn
ObjCmd.CommandText = "sp_ValidateUserLogin"
ObjCmd.CommandType = 4
Set ObjParam1 = ObjCmd.CreateParameter("RequiredLogin",adVarChar,adParamInput,64)
objCmd.Parameters.append objParam

Set ObjParam2 = ObjCmd.CreateParameter("RequiredPassword",advarchar,adParamInput,64)
objCmd.Parameters.append objParam2


objCmd.Parameters("RequiredLogin") = UserName
objCmd.Parameters("RequiredPassword")=Password


Set myRS= objCmd.Execute

While not myRS.EOF
Response.Write myRS("Name")
myRS.MoveNext
Wend

%>
</BODY>
</HTML>
0
arunatata
Asked:
arunatata
  • 2
1 Solution
 
fritz_the_blankCommented:
Are you using the ADOVBS.inc file? If not, you need to use the numeric constants instead of adVarChar, adParamInput and etc.

FtB
0
 
arunatataAuthor Commented:
Got it thanks!!
0
 
fritz_the_blankCommented:
Glad to have helped,

FtB
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now