update query not working

Results 1 to 2 of 2

Thread: update query not working

  1. #1
    Join Date
    Dec 1969

    Default update query not working

    hi,<BR>i am trying to use update query to update values of 2 columns as "".<BR>&#060;%<BR>id=""<BR>qty=""<BR>sqlupdate = "Update shopcart Set shopcart.ID =&#039"&id&"&#039, shopcart.Quantity ="&qty&" WHERE ((shopcart.ID=&#039"&DelCode&"&#039));"<BR>conn.Ex ecute(sqlupdate)<BR><BR>i get the following error,<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. <BR><BR>what could be wrong??please help.<BR><BR>also, can anybody tell me as to how to delete all rows of a database using delete statement.<BR>Thanks,<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: update query not working

    Try getting rid of the parens.<BR><BR>For the delete...<BR><BR>DELETE * FROM tablename;<BR><BR>A good way to test / develop your queries in Access, or any other db for that matter, is to response.write it to the screen, and cut and paste it into a query tool. This will usually show you exactly where the problem is.<BR><BR>HTH<BR><BR>Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts