Hi to All,
I'm new to Java and having an error in my database application using embedded derby database. I'm using netbeans 5 as my IDE.
java.lang.ClassNotFoundExceptionrg.apache.derby.jdbc.EmbeddedDriver
java.lang.NullPointerException
Code:
private void ConnectToDatabase ()
{
try
{ Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
//make connection
con= DriverManager.getConnection("jdbc:derby:Sample;user='nbuser';password='nbuser'" );
//create statement
st = con.createStatement();
}
catch (Exception e) {System.out.println(e);}
}
Any Help will be appreciated.
I'm new to Java and having an error in my database application using embedded derby database. I'm using netbeans 5 as my IDE.
java.lang.ClassNotFoundExceptionrg.apache.derby.jdbc.EmbeddedDriver
java.lang.NullPointerException
Code:
private void ConnectToDatabase ()
{
try
{ Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
//make connection
con= DriverManager.getConnection("jdbc:derby:Sample;user='nbuser';password='nbuser'" );
//create statement
st = con.createStatement();
}
catch (Exception e) {System.out.println(e);}
}
Any Help will be appreciated.