Driver to connect databse to java
I have a problem
I want to get data from a graphical interface and save them on a SQL file on Netbeans and then import from SQL to fill the graphical interface.
I have my database ready but the only
I have how to get to the SQL from java, and I tried the code, then I got an Exception
ClassNotFoundException: myDriver.ClassName SQLException: No suitable driver found for Jdbc:derby://localhost:1527/sample[app on APP] BUILD SUCCESSFUL (total time: 1 second)"
You need to add the connector jar of the database to the classpath of your project, as stated in other answers.
With Derby, that jar is the same one that runs the database. Explanation of how to add a jar to the classpath in Netbeans.
For the oracle database you need to add oracle library for the datatbase connection. oracle library is available in the path of where you installed the oracle.