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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update wont work!

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi,

I have a sort of admin area for a forum. The admin is supposed to be able to update former messages in the DB (Access, BTW). It works allright, BUT for some reason some posts wont (while some works perfectly! This is the err-msg I get:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Query-based update failed because the row to update could not be found.

Now, the row is there but still the message!

Does anyone know?

//A
 
Here's the code!

---

'Declare recordset object...
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")

Dim strSQL
strSQL = "SELECT * FROM tblForum WHERE ForumID=" & Request.QueryString("PostID")

'Open the database and get the requested info!
objRS.Open strSQL, objConn, , adLockOptimistic

'Declare var's for message info...
strMessage = Request("NewMsg")

'..and update the database!
objRS("Message") = strMessage
objRS.Update

---

... and as I said: it's working allright with the other DB posts!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top