connecting applet using mysql odbc
hope you can help me on how will i connect my applet using mysql odbc.
here is the code hope someone can help me.
String url="jdbc:odbc:mydbase";
String username="myname";
String password="mypass";
try
{
Class.forNam("sun.jdbc.odbc.JdbcOdbcDriver");
connection=DriverManager.getConnection(url,username,password );
}
catch(ClassNotFoundException cnfex)
{
System.err.println("Failed to Load JDBC/ODBC driver");
cnfex.printStackTrace();
System.exit(1);// terminate the program
}
catch(SQLException sqlex)
{
System.err.println("Unable to connect");
sqlex.printStackTrace();
}

