Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Drivers error ’80004005’
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Drivers error ’80004005’

 Post Reply Post Reply
Author
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Topic: Drivers error ’80004005’
    Posted: 13 June 2003 at 6:13am
[Microsoft][ODBC Microsoft Access Driver] Syntax error in query expression '(Wall_ID=? AND Wall_Order=? AND Wall_Title=? AND Wall_Alt=? AND 1280_Size=? AND 1024_Size=? AND 800_Size=? AND 640_Size=? AND Wall_Filename_Common=? )'.

action_delete_wallpapers.asp, line 40


Is the error details when I try to delete a record from the DB.

Code (virtually identical to other action_delete files which work fine):

Response.Buffer = True

'Read in the record to be deleted
lngRecordNo = CLng(Request.Form("WallID"))

Set rsConfig = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT tblWallpapers.* FROM tblWallpapers WHERE tblWallpapers.Wall_ID = " & lngRecordNo & ";"

'Set the lock type so that the record is locked by ADO when it is deleted
rsConfig.LockType = 3

rsConfig.Open strSQL, adoCon

'THE FOLLOWING ARE TEST LINES TO SEE IF IT'S GETTING THE CORRECT RECORD:

Response.Write("ID: " & rsConfig("Wall_ID") & "<br>")
Response.Write("Order: " & rsConfig("Wall_Order") & "<br>")
Response.Write("Title: " & rsConfig("Wall_Title") & "<br>")
Response.Write("Alt: " & rsConfig("Wall_Alt") & "<br>")
Response.Write("1280: " & rsConfig("1280_Size") & "<br>")
Response.Write("1024: " & rsConfig("1024_Size") & "<br>")
Response.Write("800: " & rsConfig("800_Size") & "<br>")
Response.Write("640: " & rsConfig("640_Size") & "<br>")
Response.Write("Filename: " & rsConfig("Wall_Filename_Common") & "<br>")

'Delete the record from the database
rsConfig.Delete

'THIS IS IN to stop the script before it redirects to the confirmation page.
Response.End


If I move the "response.end" to before the rsConfig.Delete statement, the error is not reported (ie it's the delete bit where the problem arises)

The Response.Write test lines all bring back and write the correct information, ie, the form has asked for the correct record to delete and the strSQL statement has found the record just fine.

Help!!

www.pedalcars.info

The most fun on four wheels

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2003 at 8:06am

why not just construct a "DELETE" statement instead of messing with all that ADO crap?

strSQL  = "DELETE FROM table WHERE blah blah blah"

Contribute to the working anarchy we fondly call the Internet
Back to Top
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2003 at 9:49am
I don't know, why not? OK, done this and it works, ta.

Still doesn't ease my confusion any (the above was adapted from the webwiz tutorials and the delete action in the news app) as to why one page brings back the error above while all the other pages that use seemingly identical code work fine!

www.pedalcars.info

The most fun on four wheels

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.