Wrox Programmer Forums
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2005, 04:50 AM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to feras
Default error in update query.

Hi all:

I have a serious problem, i am using asp,and access database
the problem is when i update a row in a table it give me the following error:

Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'cateId='.

cateId is an autonumber field.

the thing that suprise me that the row is updated!! but it give me the above error?

I had write the output to see how it look (response.write(sql))
and it look fine:
here is my asp code for update:

<%
If Request.Form("insert")="update" Then

set con=server.createObject("adodb.connection")
    con.open Application("Product")
    Set con=server.Createobject("adodb.connection")
    Sql="update categories set catename='" & request("catname") & "' where cateId=19"
    con.open Application("product")
    con.execute sql
     con.close
     set con= nothing
     sql=""
End If
Response.Redirect("modifycategory.asp")
%>
  any idea? please I need help as soon as possible.


 
Old May 2nd, 2005, 07:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

and what would the catname you're trying to insert be?
First try the SQL without anything dynamic, so you've got:
Sql="update categories set catename='something' where cateID=19"

see if that works then, if it doesn't you know it's not your SQL syntax that's the problem, but something else, like your schema or something.

I am a loud man with a very large hat. This means I am in charge





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Query Error Tim Johnson Access 2 December 6th, 2007 02:57 PM
SQL Update query (error message) Neal SQL Server 2000 1 August 3rd, 2007 08:57 PM
UPDATE query throws error in selective MSI tables eelisMX General .NET 0 July 14th, 2005 06:29 AM
update query error in from clause [email protected] Classic ASP Databases 1 June 6th, 2005 06:02 AM
update query error khautinh SQL Server 2000 2 July 1st, 2004 09:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.