Hi guys i trying to connect SQL server with netbeans
public class SQLconnection {
/**
* @param args the command line arguments
* @throws java.lang.ClassNotFoundException
* @throws java.sql.SQLException
*/
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String connectionURL = "jdbc:derby://localhost:1527;databaseName=Ornek;user=sa;password=123";
Connection con = DriverManager.getConnection(connectionURL);
System.out.println("Connect");
}
}
But İ have errors in Netbeans and i dont know how to pass
Exception in thread "main" java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at sqlconnection.SQLconnection.main(SQLconnection.java:23)