File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes No suitable driver using msql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No suitable driver using msql" Watch "No suitable driver using msql" New topic

No suitable driver using msql

Ajay Singh
Ranch Hand

Joined: Jan 04, 2008
Posts: 105
HI all

i am trying to fetch values from SQL database which is present in remote server.The url string of my code is

String url = "jdbc:msql://";
Class.forName ("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(url,"Ajay","Singh");
Statement stmt = conn.createStatement();
ResultSet rs;

rs = stmt.executeQuery("SELECT * from Employee");
while ( )
String name = rs.getString("Name");

Now when i run my code the following error comes

"No suitable Driver".i have downloaded oracle drivers(or which driver should i download?) and set them in the class path but still the same problem.Kindly help
David O'Meara

Joined: Mar 06, 2001
Posts: 13459


I would expect to see the MySql Driver here...
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41108
I am quite sure that JDBC URL you're using is not correct for an Oracle database. Consult the Oracle driver documentation for what to use instead.

Ping & DNS - my free Android networking tools app
Ajay Singh
Ranch Hand

Joined: Jan 04, 2008
Posts: 105
i have googled through and found this driver to be used for msql database


but i am not getting from where to download the above mentioned driver.

Also can we use MySql driver ?

As far as i know MS Sql ,MySql ,and mSQL are three different things
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Yep, I misread. You still need to get the jdbc url and driver correct though.
Ajay Singh
Ranch Hand

Joined: Jan 04, 2008
Posts: 105
i tried to download the mSQL driver from

but it says page cannot be found:-(
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

So why did you choose that particular page? When I google for "msql" I find several pages for a company that claims to have distributed MSql since 1994, but not that one.

None of those pages mentions JDBC, either, but I only spent 30 seconds researching. I would say don't start writing your program to use MSql until you see what it can do.

Edit: But apparently you already have MSql running on a server somewhere. In that case I would go and talk to the administrator of that server. They should have contacts for MSql. They might already have a JDBC driver as part of their installation.
[ July 24, 2008: Message edited by: Paul Clapham ]
Ajay Singh
Ranch Hand

Joined: Jan 04, 2008
Posts: 105
thanks everybody for the replies.The database is changed to Ms Sql and now its working fine now:-)
I agree. Here's the link:
subject: No suitable driver using msql
Similar Threads
interface method definition?
ClassNotFoundException with ResourceBundle
cannot connect to db2 v8 trial version with jdbc
Finding out the correct URL
Everytime getting an empty ResultSet