D
diggsy
Guest
Hi,
I'm trying to query an Access database with an asp page hit with a hidden form from an ecommerce site. It was working fine until I added a new variable ("speed"), and now I get the following error:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'updateUser'
/purchase_proc.asp, line 47
Line 47 of purchase_proc.asp is the following:
call updateUser(session("userid"),session("name"),session("pass"),firstname,lastname,address1,address2,city,state,zip,country,phone,email,message,views,speed)
And it comes from a jscript function as follows:
Function updateUser(userid,name,pass,firstname,lastname,address1,address2,city,state,zip,country,phone,email,message,views,speed)
sql = "UPDATE users SET "
sql = sql & "name = '" & name & "', "
sql = sql & "pass = '" & pass & "', "
sql = sql & "firstname = '" & firstname & "', "
sql = sql & "lastname = '" & lastname & "', "
sql = sql & "address1 = '" & address1 & "', "
sql = sql & "address2 = '" & address2 & "', "
sql = sql & "city = '" & city & "', "
sql = sql & "state = '" & state & "', "
sql = sql & "zip = '" & zip & "', "
sql = sql & "country = '" & country & "', "
sql = sql & "phone = '" & phone & "', "
sql = sql & "email = '" & email & "', "
sql = sql & "message = '" & message & "', "
sql = sql & "views = " & views & " "
sql = sql & "speed = '" & speed & "', "
sql = sql & "WHERE userid = " & userid & ";"
Set DBConn8 = Server.CreateObject("ADODB.Connection")
DBConn8.Open getDbCon()
Set oRS8 = DBConn8.Execute(sql)
if DBConn8.errors.count> 0 then
for counter = 0 to DBConn8.errors.count
response.write "Database Error #" & DBConn8.errors(counter).number & " -> " & DBConn8.errors(counter).description & "<br>"
next
end if
session("expires") = expires
set DBConn8 = nothing
End Function
Like I said, since I added "speed", I've been getting this worng number of arguments error. But as far as I can see the arguments with the call and the function are the same. I'm at a loss, mostly because I'm a newbie with asp, access, and the script languages. Any suggestions will be helpful. Thanks
I'm trying to query an Access database with an asp page hit with a hidden form from an ecommerce site. It was working fine until I added a new variable ("speed"), and now I get the following error:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'updateUser'
/purchase_proc.asp, line 47
Line 47 of purchase_proc.asp is the following:
call updateUser(session("userid"),session("name"),session("pass"),firstname,lastname,address1,address2,city,state,zip,country,phone,email,message,views,speed)
And it comes from a jscript function as follows:
Function updateUser(userid,name,pass,firstname,lastname,address1,address2,city,state,zip,country,phone,email,message,views,speed)
sql = "UPDATE users SET "
sql = sql & "name = '" & name & "', "
sql = sql & "pass = '" & pass & "', "
sql = sql & "firstname = '" & firstname & "', "
sql = sql & "lastname = '" & lastname & "', "
sql = sql & "address1 = '" & address1 & "', "
sql = sql & "address2 = '" & address2 & "', "
sql = sql & "city = '" & city & "', "
sql = sql & "state = '" & state & "', "
sql = sql & "zip = '" & zip & "', "
sql = sql & "country = '" & country & "', "
sql = sql & "phone = '" & phone & "', "
sql = sql & "email = '" & email & "', "
sql = sql & "message = '" & message & "', "
sql = sql & "views = " & views & " "
sql = sql & "speed = '" & speed & "', "
sql = sql & "WHERE userid = " & userid & ";"
Set DBConn8 = Server.CreateObject("ADODB.Connection")
DBConn8.Open getDbCon()
Set oRS8 = DBConn8.Execute(sql)
if DBConn8.errors.count> 0 then
for counter = 0 to DBConn8.errors.count
response.write "Database Error #" & DBConn8.errors(counter).number & " -> " & DBConn8.errors(counter).description & "<br>"
next
end if
session("expires") = expires
set DBConn8 = nothing
End Function
Like I said, since I added "speed", I've been getting this worng number of arguments error. But as far as I can see the arguments with the call and the function are the same. I'm at a loss, mostly because I'm a newbie with asp, access, and the script languages. Any suggestions will be helpful. Thanks