This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes  java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark " java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp" Watch " java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp" New topic
Author

java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp

Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 35

Hi all,

I was trying to do JDBC using following code,



Then I got following exception,

Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.JDBCDemo.main(JDBCDemo.java:21)




[Thumbnail for Capture.PNG]


~R@njeet.
Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 35

Hey that was my mistake, I wrote



Actually it should be -



only ":" was missing after mysql.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp
 
It's not a secret anymore!