Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Error after record is written in the database

Status
Not open for further replies.

vias

Programmer
Apr 25, 2000
54
GB
I'm writing into an Access database.

I'm getting this error although the record has been
successfully written in the db.

Microsoft OLE DB Provider for ODBC Drivers error '80040e2f'

[Microsoft][ODBC Microsoft Access Driver]Error in row

/signup2.asp, line 187


Here is the code :
---------------------------------------------
set conn = server.CreateObject ("adodb.connection")
conn.Open Application("strConn")
set rs = server.CreateObject("adodb.recordset")
rs.Open "select * from Users where 1=2",conn,1,3
rs.AddNew

rs("Uname") = uname
rs("Pwd") = Pwd
rs("FName") = FName
rs("LName") = LName
rs("UEmail") = UEmail
rs("Sex") = sex
rs("BDate") = BDate
rs("Pwd") = Pwd
rs("City") = city
rs("Country") = country
rs("Infofrom") = infofrom
rs("Status") = "N"
rs.Update <================ error on this line (187)

session(&quot;UName&quot;) = uname
rs.Close
-------------------------------------------
Can i have your feed-back please.

Thanks
 
A couple of things I see, though I don't know that they're causing the problem: You're setting the Pwd twice (but I wouldn't think this would cause an error), and your Select statement is odd to me (where 1=2)... is &quot;1&quot; a field name?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top