PLEASE HELP JAVA/SQL question
Posted
by fred-ghosn
on Stack Overflow
See other posts from Stack Overflow
or by fred-ghosn
Published on 2010-06-09T21:29:31Z
Indexed on
2010/06/09
21:32 UTC
Read the original article
Hit count: 241
Hello everyone, well I'm new here and I really need some help.. I want to create a table and this table's name will be inserted from a textfield. However when I run the query it's giving me an error, any help on this one? Ill paste the code here:
public boolean CreateTable() { TableNumber=jTextField4.getText(); try {
String password = null;
String s = "CREATE TABLE '"+TableNumber+'" (Item char(50),Price char(50))";
ConnectionForOrders();
stmt = conn.createStatement();
stmt.executeUpdate(s);
boolean f=false;
ConnectionForOrdersclose();
© Stack Overflow or respective owner