Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A question about Applet and DataBase!

Status
Not open for further replies.

tiger2002

Programmer
May 22, 2001
1
JP
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());
}

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top