Hello All,
Hoping for a little help.
I'm using a parametered sql stored proc to accept and return variables to my
asp page. The SP works fine as I've tested it separately.
The error and code is below.
Fairly new to asp, all comments are appreciated.
Thanks in advance, R
Here is the error:
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/gplogout.asp, line 83
Here is my asp:
<%
Dim objConn
Dim objCmd
Dim txtUser
Dim txtPswd
dim txtloggedout
'Form Values
txtUser = request.form("txtUserName")
txtPswd = request.form("txtPassword")
<!--include file=adovbs.inc"-->
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "Provider=SQLOLEDB;Data Source=SQLServer;Initial
Catalog=MYDB;User ID=UserName;Password=1234"
set objCmd = Server.CreateObject("ADODB.Command")
With objCmd
.ActiveConnection = objConn
.CommandText = "X_storedproc_test"
.CommandType = 4 'adcmdstoredproc 'Requires the adovbs.inc file or
typelib meta tag
'Add Input Parameters
.Parameters.Append .CreateParameter("@UName", adVarChar, adParamInput,
30, txtUser)
.Parameters.Append .CreateParameter("@Pswrd", adVarChar, adParamInput,
30, txtPswd)
'Add Output Parameters
.Parameters.Append .CreateParameter("@loggedout", adInteger, adParamOutput)
'Execute the function
.Execute, , adExecuteNoRecords
'Extract the output parameter which the SP has supplied from the parameter
collection'
txtloggedout = .parameters("@loggedout")
End With
'Update the user