I wan to connect to a DataBase in the Applet.How can I do?
My source code likes following:
There are some run-time error about access to the DB is denied,etc....
( I use appletviewer to browser the testDB.html )
public class testDB extends Panel
{
public testDB()
{
init();
}
public void init()
{
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String dataSource = "RallyDB";
Class.forName(driver);
Connection con = DriverManager.getConnection("Jdbc:Odbc:" + dataSource);
.......
setLayout(new BorderLayout());
}
}
My source code likes following:
There are some run-time error about access to the DB is denied,etc....
( I use appletviewer to browser the testDB.html )
public class testDB extends Panel
{
public testDB()
{
init();
}
public void init()
{
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String dataSource = "RallyDB";
Class.forName(driver);
Connection con = DriverManager.getConnection("Jdbc:Odbc:" + dataSource);
.......
setLayout(new BorderLayout());
}
}