Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2005

Tip: Looking for answers? Try searching our database.

'No suitable driver' error

Thread view: 
MS - 31 Jan 2005 17:10 GMT
Hi,

I'm trying to connect to a MySQL DB (on a Linux machine) from a Java app
that I'm writing on a Win 32 machine via ODBC (MySQL ODBC 3.51 driver).

It fails --throwing an exception-- at the getConnection stage, the
exception says 'No suitable driver'.

Here's my connection string, am I formatting it wrong?

String url = "jdbc:odbc:mysqlFilms";
Connection con = DriverManager.getConnection(url);
// also tried
// Connection con = DriverManager.getConnection(url, "user", "pass");

'mysqlFilms' is the name of the 'user data source' in windows's ODBC 'data
source administrator'. I've spelt it correctly (!) and the 'mysqlFilms'
entry tests correctly within the ODBC 'data source administrator' and
works fine from a C#/.net database client I wrote.

Any suggestions?

Thanks,

MS
Mark Matthews - 31 Jan 2005 19:57 GMT
> Hi,
>
[quoted text clipped - 21 lines]
>
> MS

MS,

You _really_ don't want to use the JDBC:ODBC bridge. I suggest you grab
a copy of the latest version of the MySQL JDBC driver (it's called
'Connector/J'), and install it. It'll be much easier to use, and more
stable.

See http://dev.mysql.com/downloads/connector/j/3.1.html

Regards,

    -Mark
MS - 31 Jan 2005 23:10 GMT
Mark Matthews emailed this:

>>Hi,
>>
[quoted text clipped - 34 lines]
>
>     -Mark

Ok thanks Mark.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.