Ciao a tutti,
sto provando a connettere un applet ad un server mysql
la cosa risulta ostica
codice:
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/dbname","dbuser","dbpwd");
PreparedStatement usr_query = conn.prepareStatement("SELECT concat(Ttr_Nome,' ',Ttr_Cognome) as nominativo FROM Ttr WHERE Ttr_ID = '"+ usr_id +"'");
ResultSet Ttr = usr_query.executeQuery();
Ttr.next();
type = Ttr.getString("nominativo");
}catch (Exception x){
type = x.toString();
}
ovviamente la stringa type invece che fornire il nominativo, fornisce l'eccezione.
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
che fare devo utilizzare i socket?