dbTalk Databases Forums  

Réf. : Re: Réf. : No Suitable Driver

mailing.database.mysql-java mailing.database.mysql-java


Discuss Réf. : Re: Réf. : No Suitable Driver in the mailing.database.mysql-java forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jeanyves.beaujean@corman.be
 
Posts: n/a

Default Réf. : Re: Réf. : No Suitable Driver - 07-01-2004 , 08:55 AM






--=_alternative 004C74BFC1256EC4_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

See the correction in your code...


Regards,

Jean-Yves.





Sridevi Salagrama <sridevi (AT) wayne (DOT) edu>
01/07/2004 15:50
Veuillez r=E9pondre =E0 Sridevi.Salagrama

=20
Pour : jeanyves.beaujean (AT) corman (DOT) be
cc : java (AT) lists (DOT) mysql.com
Objet : Re: R=E9f. : No Suitable Driver


Hi,
The error is as follows.

java.lang.ClassNotFoundException: com.mysql.jdbc.driver
SQLException: No suitable driver
SQLState: 08001
VendorError: 0

Class.forName("com.mysql.jdbc.Driver").newInstance ();
Class.forName("com.mysql.jdbc.driver").newInstance ();
Connection conn =3D DriverManager.getConnection
("jdbc:mysql://localhost/test?
user=3D<username>&password=3D<password>");

I have these two lines of code.

Thanks





---- Original message ----
Quote:
Date: Thu, 1 Jul 2004 15:40:08 +0200
From: jeanyves.beaujean (AT) corman (DOT) be=20
Subject: R=E9f. : No Suitable Driver=20
To: sridevi (AT) wayne (DOT) edu
Cc: java (AT) lists (DOT) mysql.com

Hello,

This is a connection problem, not a classpath problem.
If it was a classpath problem the exception would be=20
'ClassNotFoundException'

To get a connection, proceed like this :

Connection connection =3D=20
DriverManager.getConnection
("jdbc:mysql://<yourhost>:<your=5Fserveur=5Fport>/<your=5Fbase>","y
our=5Fusername","password"=20
Quote:
);
Statement stmt =3D connection.createStatement();

Thats all.

Jean-Yves.





Sridevi Salagrama <sridevi (AT) wayne (DOT) edu
01/07/2004 15:11
Veuillez r=E9pondre =E0 Sridevi.Salagrama

=20
Pour : java (AT) lists (DOT) mysql.com
cc :=20
Objet : No Suitable Driver


Hi,

I have just down loaded the mysql connector/j version=20
3.0.14-
production. I have set the classpath for the jar file and=20
I am using "com.mysql.jdbc.Driver" as the class that=20
implements java.sql.Driver.


I have not been succesful. I keep getting a No suitable=20
Driver (SQl Exception)

Can any body please tell me what I might be doing wrong.

Thanks



--=20
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?
unsub=3Djeanyves.beaujean (AT) corman (DOT) be





--=_alternative 004C74BFC1256EC4_=--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.