Connecter a un BD

mondila Messages postés 77 Statut Membre -  
OOoForum Messages postés 4151 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour tout le monde,
j'ai créer un connection a ma BD-biblio- en passant par un programme en java(avec NetBean)
le code source est :

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package biblio;
import java.sql.*;

/**
*
* @author Administrateur
*/
public class Biblio {
public Connection connexion;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
try{
Class.forName("com.jdbc.sqlserver.SQLServerDriver");
Connection connexion=DriverManager.getConnection("jdbc:mysql:sqlserver://localhost/biblio", "****", "****");
Statement stm = connexion.createStatement();
ResultSet resultat = stm.executeQuery("SELECT * FROM Emprunteur");
while(resultat.next()){
String i = resultat.getString("CNE");
String s = resultat.getString("CIN");
String b = resultat.getString("NomEtd");

System.out.println("Emprunteur = " + i + " " + s + " " + b);
}

}catch(Exception e){
System.out.println("echec pilote : "+e);

}
}
}
et il affiche l'erreur suivant :
echec pilote : java.lang.ClassNotFoundException: com.jdbc.sqlserver.SQLServerDriver

aide moi SVP urgent;

merci

1 réponse

OOoForum Messages postés 4151 Date d'inscription   Statut Membre Dernière intervention   963
 
>aide moi SVP urgent;
Les bénévoles sont en train de traiter les urgences de juillet.
Merci de votre patience.
0