I am rewriting a console application to an applet. Problem comes up
when I try to load the JDBC-ODBC bridge, it dies as soon as it tries
to load the driver, with the following error:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
Here is my DataBase connection class. Any help would be greatly
appreciated.
class DBConn
{
Connection con;
public DBConn(String source,String login,String password)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection
("jdbc:odbc:"+source,login,password);
}
catch(Exception e)
{
System.out.println(e+" DBConn");
}
}
public Connection getCon()
{
return con;
}
public void closeCon()
{
try
{
con.close();
}
catch(Exception e)
{
System.out.println(e+" DBConn.closeCon");
}
}
}