No suitable driver found for...
When I try to cennect to a mysql database I get this error:
No suitable driver found for jdbc:mysql:127.0.0.1:3306/rehber/rehber
The Code is here:
CN = DriverManager.getConnection("jdbc:mysql:" + Adresse +"/" + DataBase +"/rehber", UserName, Password);
Error comes as exception:
int a;
try{
CN = DriverManager.getConnection("jdbc:mysql:" + Adresse +"/" + DataBase +"/rehber", UserName, Password);
a = 1;
}catch(Exception e){
System.err.println(e.getMessage());
a = 0;
}finally{
try{
if(CN !=null)
CN.close();
}catch(SQLException e){
System.err.println("SQL: " + e.getMessage());
a = 0;
}
}
return a;
Message was edited by:
Genomsaren
# 6
> how can I understand that the driver is installed or
> not?
> I have installed a driver from MySQL's website. There
> is a file called mysql-connector-java-5.0.6-bin.jar
> in it. And I dont know how to install it?
So, you haven't clicked nor read the link I gave first?
# 10
Here is the downlaod link:
http://rapidshare.com/files/36744482/Java_Deneme.rar.html
You can look the code if you want. It is my first "software" in java so you can find very amateur things in it. If you want to test the software you will need mysql server and a database called "rehber". Everything is turkish. If you want I can translate it until thursday. (Im busy today).
Baglan=Connect
Rehber=Where you save telephone numbers
Giris=Login
Veri Tabani=Database
Kullanıcı Adı=Username
Sifre=Password