-
Updating a Table from a JAVAServlett
Hi,
I have some problems with the syntax in my SQL UPDATE statement, it looks like this;
state.executeUpdate("UPDATE TABLE presentation SET Names ='"+ name +"' , SET Pres ='"+ press +"', SET Musik ='"+ musik +"', SET City ='"+ city+"', SET Clubb='"+ club+"'");
I have tried many variations with " " and ' "
Only when I try and run my servlet I get the following exception:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
My question is: how should the SQL syntax look olike in my SQL statement?
/Robert
-
If I remember correctly, you only need to write "SET" only one time. So that would make:
state.executeUpdate("UPDATE TABLE presentation SET Names ='"+ name +"' , Pres ='"+ press +"', Musik ='"+ musik +"', City ='"+ city+"', Clubb='"+ club+"'");
Similar Threads
-
By William Ed Carden in forum VB Classic
Replies: 2
Last Post: 10-17-2005, 05:09 PM
-
Replies: 0
Last Post: 12-23-2002, 11:12 PM
-
By Bill Wong in forum VB Classic
Replies: 2
Last Post: 06-13-2002, 11:56 AM
-
By SteveW in forum Database
Replies: 1
Last Post: 07-17-2001, 12:29 PM
-
Replies: 0
Last Post: 12-28-2000, 10:26 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks