PRB: No Suitable Driver Exception With JDBC Bridge and SDK

Last reviewed: January 29, 1998
Article ID: Q179854
The information in this article applies to:
  • SDK for Java, versions 2.0, 2.01
  • Microsoft Win32 Virtual Machine for Java

SYMPTOMS

When running your Java class that uses the JDBC bridge with the SDK for Java 2.0 or newer, you see the following exception:

   java.sql.SQLException: No suitable driver

CAUSE

One of the frequent causes for this exception is running any application that the JDBC bridge shipped with the SDK for Java 2.0 Beta.

RESOLUTION

In general, the package name has changed to com.ms.jdbc.odbc with Internet Explorer 4.0x and SDK for Java 2.0x Virtual Machines. For example the following lines should be changed:

   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

   -or-

  Class.forName("com.ms.sql.CDriver");

to:

   Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");

MORE INFORMATION

Other common causes for "No suitable driver" are invalid connection strings, user IDs, passwords, and security restrictions imposed on the driver (if it was downloaded and is not trusted).

REFERENCES

More information on the JDBC driver is included the SDK 2.0x for Java documentation and the "JDBC" sample available with the SDK2.0x.

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/visualj/
   http://support.microsoft.com/support/java/

Keywords          : JDB
Technology        : kbInetDev internet odbc
Version           : WINDOWS:2.0,2.01
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.