Hello all,
I am using NetBeans with JavaDB using the embedded driver. When I try to write to my database, I keep getting the error java.sql.SQLSyntaxErrorException the table does not exist.
I use the sql statement String sql = "INSERT INTO APP.tblname (tblID, fname) VALUES (1, blue)"; and then I get java.sql.SQLSyntaxErrorException: Table/View 'APP.tblname' does not exist.
also when I use String sql = "INSERT INTO tblname (tblID, fname) VALUES (1, blue)"; I still get an error that the table does not exist, even though my tables are visible under the Services console view in Netbeans.
This is my connection pool:
Connection conn; String driver = "org.apache.derby.jdbc.EmbeddedDriver"; String connectionURL = "jdbc:derby:"; String dbName = "gameDB"; // the name of the database try { Class.forName(driver); } catch (java.lang.ClassNotFoundException e) { e.printStackTrace(); } try { conn = DriverManager.getConnection(connectionURL + dbName);
I notice also when I try to connect the database by right clicking and clicking on connect, from the services view in Netbeans, it keeps bringing up the clientdriver connection node, even though the embedded driver connection node I want to use is there. So I just right click on the embedded driver connection mode and then click connect so I don't get the message no driver found, only that it does not appear to see that tables under the "APP" schema in my embedded driver.
Please Please help!