6 messages in com.mysql.lists.javaRe: Driver error| From | Sent On | Attachments |
|---|---|---|
| Susidzaimah Pg Sulaiman CS2000 | 10 Feb 2004 03:15 | |
| Ricardo Lopes | 10 Feb 2004 04:33 | |
| Mike Markovich | 10 Feb 2004 08:17 | |
| Susidzaimah Pg Sulaiman CS2000 | 10 Feb 2004 08:31 | |
| Jeff Mathis | 10 Feb 2004 08:36 | |
| Susidzaimah Pg Sulaiman CS2000 | 10 Feb 2004 08:53 |
| Subject: | Re: Driver error![]() |
|---|---|
| From: | Ricardo Lopes (lop...@elevaconsult.pt) |
| Date: | 02/10/2004 04:33:00 AM |
| List: | com.mysql.lists.java |
This error is because the driver isnt in your classpath, you can:
a) add the driver jar to your classpath b) extract the driver jar to your program/servlet folder c) include the driver jar in your java lib folder (not recommended but works)
----- Original Message ----- From: "Susidzaimah Pg Sulaiman CS2000" <spgs...@cis.strath.ac.uk> To: "Maria Dolores Moral" <yoy...@dif.um.es>; <ja...@lists.mysql.com> Sent: Tuesday, February 10, 2004 11:16 AM Subject: Re: Driver error
it seems that the compiler skip anything once it found
+++++++++++++ Class.forName("org.gjt.mm.mysql.Driver").newInstance(); connection = DriverManager.getConnection("jdbc:mysql://devweb.cis.strath.ac.uk/" + user + "?user=" + user + "&password=" + password); +++++++++++++++
in the try statement and goes straight to catch statement. is possible because of my JDBC driver? but I have tested the JDBC driver in a simple java program (not servlet) and it does connect to mySQL database.
regards susi sulaiman
Maria Dolores Moral wrote:
Hi again I don't know very much about mysql, but I think you must especified the port and DB. Print something before the place where you made:
connection=DriverManager.getConnection ... System.out.printl("Pass");
If you can see it, try it:
connection=DriverManager.getConnection("jdbc:mysql://devweb.cis.strath.ac.uk :3306/<DB>"
+ user + "?user=" + user + "&password=" + password);
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=lop...@elevaconsult.pt




