File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Using Variables to UPDATE Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Using Variables to UPDATE" Watch "Using Variables to UPDATE" New topic
Author

Using Variables to UPDATE

Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

Could someone please provide a correct syntax for the following code? I am trying to use a String variable to do an update to a table. Thanks a lot!
<CODE>
String myVariable = "TableName";
updateString = "UPDATE " + myVariable +
"SET PROJECT = 'QA' " +
"WHERE PROJECT = 'SYSADM'";
</CODE>
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
A space before SET PROJECT?
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

Yes! Thanks!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Using Variables to UPDATE
 
Similar Threads
Simple Tag - Sending/Setting an Attribute in the JSP
HttpSession in bean
Sending the value from jsp to jsp in two different web applicaitons
query on static varibale
popup window loses variable