3 messages in com.mysql.lists.javamysql in java error connection| From | Sent On | Attachments |
|---|---|---|
| SOF - Dragone Jose Luis | 05 Dec 2006 08:27 | |
| Fabian Bieker | 05 Dec 2006 09:41 | |
| public | 05 Dec 2006 09:51 |
| Subject: | mysql in java error connection![]() |
|---|---|
| From: | SOF - Dragone Jose Luis (jdra...@ext-sof.sba.com.ar) |
| Date: | 12/05/2006 08:27:26 AM |
| List: | com.mysql.lists.java |
Sorry if the answer is already in the archives but:
I have no idea on how to connect to MySQL 4.1.11 using java 1.5
I'm trying this way:
public static final String DRIVER = "com.mysql.jdbc.Driver"; // this one exist and is in : src/com/mysql/jdbc/Driver.java
public static final String URL_JDBC = "jdbc:mysql:host-ip-number:3306:databasename:username:password"; // I think the problem is here
public MySQLDAOFactory() {
try {
Class.forName(DRIVER);
} catch (ClassNotFoundException e) {
System.err.println("DRIVER not loaded");
e.printStackTrace();
....
public static Connection createConnection() throws SQLException {
return DriverManager.getConnection(URL_JDBC);
BUT I GET this ERROR in DEBUG
insercionjava.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at dao.MySQLDAOFactory.createConnection(MySQLDAOFactory.java:28)
at dao.MySQLPersonaDAO.insertarPersona(MySQLPersonaDAO.java:11)
at dao.InsertarDatosPersonales.insertarFila(InsertarDatosPersonales.java:62)
at dao.InsertarDatosPersonales.actionPerformed(InsertarDatosPersonales.java:72)
thanks
Jose
*** ADVERTENCIA *** - El contenido del presente mensaje y los archivos adjuntos que pudiera contener son privados, estrictamente confidenciales y exclusivos para su destinatario, pudiendo contener informacion protegida por normas legales y de secreto profesional. Bajo ninguna circunstancia su contenido puede ser transmitido o revelado a terceros ni divulgado en forma alguna. En consecuencia de haberlo recibido por error, rogamos contactar al remitente y eliminarlo de su sistema. No nos responsabilizamos por la integridad y la seguridad de este mensaje, ya que el mismo podria estar sujeto a manipulaciones ilegales de informacion. *** WARNING *** - The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The integrity and security of this message cannot be guaranteed and it may be subject to unauthorized amendment, for which we accept no liability.




