Problems connecting jbuilder 8 personal to mysql database
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   j_carl
Posted On:   Wednesday, May 14, 2003 01:46 AM

Hi I am newbie to Jbuilder and mysql so help or advice at all would be greatly appreciated! I have jbuilder 8 personal on my win 2000 that I'm trying to connect to a mysql 4.0 database, connector j/connector 3.0. The problem is that jbuilder complaining that it can't find the driver, and I know the server is running smoothly I've tried to add the jar-file in to project->project properties->required libraries->add->new..->add(new librarywizard)->mysql-connector-java-3.0.7-stable.jar import java.sql.*; public class mysqldb { public void Mydb() throws ClassNotFoundException, SQLException { Class.forN   More>>

Hi


I am newbie to Jbuilder and mysql so help or advice at all would be greatly appreciated!


I have jbuilder 8 personal on my win 2000 that I'm trying to connect to a mysql 4.0 database, connector j/connector 3.0.


The problem is that jbuilder complaining that it can't find the driver, and I know the server is running smoothly


I've tried to add the jar-file in to


project->project properties->required libraries->add->new..->add(new librarywizard)->mysql-connector-java-3.0.7-stable.jar


import java.sql.*;

public class mysqldb {

public void Mydb() throws ClassNotFoundException, SQLException {

Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql:\localhost";
String user = "root";
String password = "";

Connection con = DriverManager.getConnection(url, user,password);

}
}


java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager.java:532)

at java.sql.DriverManager.getConnection(DriverManager.java:171)



What is wrong?

Thanks J

   <<Less

Re: Problems connecting jbuilder 8 personal to mysql database

Posted By:   Carlos_Lee  
Posted On:   Thursday, May 15, 2003 11:13 AM

Put the com and org directories in your classpath and copy the jar file in jre/lib/ext where jre is your path to your java runtime

Re: Problems connecting jbuilder 8 personal to mysql database

Posted By:   watson_lee  
Posted On:   Wednesday, May 14, 2003 03:50 AM

Tool->Enterprise Setup->Database Drivers->Add
choose you build library just now. mysql's library
restart you jbuilder8
this is oracle's mothod ,mysql will like is,:)
About | Sitemap | Contact