aspose file tools*
The moose likes JDBC and the fly likes Java Connectivity with MySQL5.1.22 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java Connectivity with MySQL5.1.22" Watch "Java Connectivity with MySQL5.1.22" New topic
Author

Java Connectivity with MySQL5.1.22

Sahaiy Quadri
Greenhorn

Joined: Dec 16, 2011
Posts: 6
Hi Everyone,

I am running all software on one machine.
I have java jdk1.6.14 installed in C drive and MySQL 5.1.22 installed in D drive.
Drivers with MySQL Tools (all in D drive ) were

jtds-1.2.jar
junit.jar
mysql-connector-java-5.0.4-bin.jar
mysql-grt-java-1.0.0-bin.jar
sapdbc-7_6_00_12_4339.jar

A simple connection with DriverManager.getConnection("jdbc:mysql://localhost/dbname","root","password"); is giving the error no suitable driver found for jdbc:my........./dbname
All Java programs are running fine. MySQL too is working and giving all query results. Both are woking well when separate. But problem is arising only when i wish to connect both of them.
Any Help???

Regards,
SAH
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19757
    
  20

Did you load the class first? This single line should do that:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Sahaiy Quadri
Greenhorn

Joined: Dec 16, 2011
Posts: 6
Thanks for the help, yes i forgot that line. Can you help with NetBeans IDE 7.0.1 and Java Bean??
 
 
subject: Java Connectivity with MySQL5.1.22