I guess it should be
"WHERE ID = ID"
does this solve your problem..?
Note:
It's good that you'r creating your query as a string first and then using it.
I would suggest you to print that string using "println" so that. There'r two
advantages. 1. U can try the same query directly in the database and 2. the
errors might be more clear from what the string looks like when printed.
hope this helps..!!
good luck,
Pankaj.
Ross Maguire <[EMAIL PROTECTED]> wrote:
> ---------------------------------------------
> Attachment:
> MIME Type: multipart/alternative
> ---------------------------------------------
Hi all,
I am having a bit of a problem with an UPDATE statement to an MS
Access database. All of my other statements work well, such as DELETE, SELECT,
etc. Could someone have a look at my code below, and show me where I have made
a mistake? As it stands, I get a syntax error with the UPDATE statement. I am
sure it is something simple, so any pointers will be appreciated. I have
included an example below:
Statement stmt = conn.createStatement();
String updateString =("UPDATE StockTable "
+ "SET Description = Description "
+ "SET Price = Price "
+ "SET InStock = InStock "
+ "WHERE ID + ID");
stmt.executeUpdate(updateString);
conn.commit();
stmt.close();
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html