Updating db... still struggling

  • Thread starter Thread starter Matt Shudy
  • Start date Start date
M

Matt Shudy

Hey,

Here is my sql statement

Dim strSQL
strSQL="UPDATE Password SET Password='" & Request.Form
("Password") & "' WHERE Username='" & Request.Form
("Username") & "'
Dim objRS
Set objRS=Server.Create("ADODB.Recordset")
objRS.Update strSQL, objConn

the request.form usernmae is a hidden field on the
previous page.

This is the error I get when I try to run this

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check
OLE DB status value, if available. No work was done.

What am I doing wrong?

Thanks,

Matt Shudy
 
What is the tablename? Is it Password? The database is probably getting
confused because normally you don't have a tablename with the same name as a
field. Also, in some databases Password is a reserved keyword and you may
have to rename it or suround it with brackets like [Password]. Also, make
sure that your fields are the correct datatypes. Sometimes password fields
are binary fields and this would definitely through an error.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Call your mdb table "Users" or "UserList" - something that identifies exactly
what it is.

Mark Fitzpatrick said:
What is the tablename? Is it Password? The database is probably getting
confused because normally you don't have a tablename with the same name as a
field. Also, in some databases Password is a reserved keyword and you may
have to rename it or suround it with brackets like [Password]. Also, make
sure that your fields are the correct datatypes. Sometimes password fields
are binary fields and this would definitely through an error.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

Matt Shudy said:
Hey,

Here is my sql statement

Dim strSQL
strSQL="UPDATE Password SET Password='" & Request.Form
("Password") & "' WHERE Username='" & Request.Form
("Username") & "'
Dim objRS
Set objRS=Server.Create("ADODB.Recordset")
objRS.Update strSQL, objConn

the request.form usernmae is a hidden field on the
previous page.

This is the error I get when I try to run this

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check
OLE DB status value, if available. No work was done.

What am I doing wrong?

Thanks,

Matt Shudy
 
Back
Top