I have the following query:
I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 19.
/_registered.asp, line 109
Basically on the Execute line it is erroring out. I have the same amount of parameters in the append as I do the UPDATE statement. Any help would be greatly appreciated.
Thanks.
Swi
Code:
Set cmd = server.createobject("ADODB.Command")
cmd.ActiveConnection = conHAR
cmd.CommandType = 1
cmd.CommandTimeout = 900
cmd.CommandText = _
"UPDATE [Master] SET [firstname] = @firstname, " & _
"[middlename] = @middlename, [lastname] = @lastname, " & _
"[address1] = @address1, [address2] = @address2, " & _
"[city] = @city, [state] = @state, " & _
"[zip] = @zip, [email] = @email, " & _
"[mobilephone] = @mobilephone, [homephone] = @homephone, " & _
"[password] = @password, [dining] = @dining, [tablegames] = @tablegames, " & _
"[onlinegaming] = @onlinegaming, [entertainment] = @entertainment, " & _
"[slotplay] = @slotplay, [registered] = @registered, [entrydate] = @entrydate " & _
"WHERE [playercardnum] = '" & playercardnum & "' AND " & _
"[dateofbirth] = '" & dateofbirth & "'"
cmd.Parameters.Append cmd.CreateParameter("@firstname",202,1,30, request.form("firstname"))
cmd.Parameters.Append cmd.CreateParameter("@middlename",202,1,1, request.form("middlename"))
cmd.Parameters.Append cmd.CreateParameter("@lastname",202,1,30, request.form("lastname"))
cmd.Parameters.Append cmd.CreateParameter("@address1",202,1,50, request.form("address1"))
cmd.Parameters.Append cmd.CreateParameter("@address2",202,1,50, request.form("address2"))
cmd.Parameters.Append cmd.CreateParameter("@city",202,1,30, request.form("city"))
cmd.Parameters.Append cmd.CreateParameter("@state",202,1,2, request.form("state"))
cmd.Parameters.Append cmd.CreateParameter("@zip",202,1,10, request.form("zip"))
cmd.Parameters.Append cmd.CreateParameter("@email",202,1,50, request.form("email"))
cmd.Parameters.Append cmd.CreateParameter("@mobilephone",202,1,12, request.form("mobilephone"))
cmd.Parameters.Append cmd.CreateParameter("@homephone",202,1,12, request.form("homephone"))
cmd.Parameters.Append cmd.CreateParameter("@password",202,1,10, request.form("psd"))
cmd.Parameters.Append cmd.CreateParameter("@dining",11,1,, 1)
cmd.Parameters.Append cmd.CreateParameter("@tablegames",11,1,, 1)
cmd.Parameters.Append cmd.CreateParameter("@onlinegaming",11,1,, 1)
cmd.Parameters.Append cmd.CreateParameter("@entertainment",11,1,, 1)
cmd.Parameters.Append cmd.CreateParameter("@slotplay",11,1,, 1)
cmd.Parameters.Append cmd.CreateParameter("@registered",11,1,, 1)
cmd.Parameters.Append cmd.CreateParameter("@entrydate",135,1,, Now())
cmd.Execute
Set conHAR = Nothing
I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 19.
/_registered.asp, line 109
Basically on the Execute line it is erroring out. I have the same amount of parameters in the append as I do the UPDATE statement. Any help would be greatly appreciated.
Thanks.
Swi