dimanche 27 avril 2014

N'arrive pas à connecter le pilote JDBC sql server au projet eclipse de java - Stack Overflow


I'm trying to setup the connect from my sql server database to my project but when i try to compile it i get:


    java.sql.SQLException: No suitable driver found for jdbc.odbc:login_DSN
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at SelfPractice.main(SelfPractice.java:13)

I'm very much new to this. i went to controlPanel>adminstrive tools>data sources and there added a data source called login_DSN . i've looked in older posts and they say to include the driver jar file in class path which i think i did(i downloaded the jdbc driver from microsoft website and loaded it to a 'referenced library' in eclipose, but i still get this error message. How do i solve my driver problem?




If you want to add mysql driver to eclipse project classpath you need to follow these steps: 1. Go to Project Explorer Window of Eclipse, Right click on the project, select Properties. 2. Click on Java Build Path from list of properties and then select Libraries tab 3. Click on Add External JARs button to add mysql_connector.jar(which you have downloaded earlier) to your project's classpath.


Hope this helps.



I'm trying to setup the connect from my sql server database to my project but when i try to compile it i get:


    java.sql.SQLException: No suitable driver found for jdbc.odbc:login_DSN
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at SelfPractice.main(SelfPractice.java:13)

I'm very much new to this. i went to controlPanel>adminstrive tools>data sources and there added a data source called login_DSN . i've looked in older posts and they say to include the driver jar file in class path which i think i did(i downloaded the jdbc driver from microsoft website and loaded it to a 'referenced library' in eclipose, but i still get this error message. How do i solve my driver problem?



If you want to add mysql driver to eclipse project classpath you need to follow these steps: 1. Go to Project Explorer Window of Eclipse, Right click on the project, select Properties. 2. Click on Java Build Path from list of properties and then select Libraries tab 3. Click on Add External JARs button to add mysql_connector.jar(which you have downloaded earlier) to your project's classpath.


Hope this helps.


0 commentaires:

Enregistrer un commentaire