This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
Retrieving Database Table Column names using JDBC
get the users input from a column
help with a sql statement
Dynamic column selection in prepared statement?
jsp postgress connection