This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes setting the column names in a sql statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "setting the column names in a sql statement" Watch "setting the column names in a sql statement" New topic
Author

setting the column names in a sql statement

ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
hello everyone i hope someone can help me.
i want a sql statement that gets the column names from a arraylist for example
String sql = ("INSERT INTO Cust (and i want this part to get what is in the arraylist) values (?, ?, ?)");
is there any way i can do this?
thanks for your time
loftty
Blake Minghelli
Ranch Hand

Joined: Sep 13, 2002
Posts: 331
I think this belongs in a different forum, but you can try this:


Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting the column names in a sql statement