PLEASE HELP JAVA/SQL question
- by fred-ghosn
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();