Why I'm getting error "cannot find symbol: createStatement()"? My goal is to create a t1 Tab
object in a TestClass and calls t1.Cr()
with a String
parameter.
I'm not forgetting the import java.sql.*;
public void Cr() throws Exception {
try {
ConexaoPlus con = new ConexaoPlus();
con.conect();
Statement st = con.createStatement();
st.execute("CREATE TABLE " + getName() + "();");
st.execute("DROP TABLE " + getName() + "();");
st.close();
} catch (Exception e) {
e.printStackTrace();
}
}
Thanks in advance!