Microsoft KB Archive/179854

= No suitable driver exception with JDBC bridge and SDK =

Article ID: 179854

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Software Development Kit for Java 2.02
 * Microsoft Software Development Kit for Java 2.01
 * Microsoft Software Development Kit for Java 2.02
 * Microsoft Software Development Kit for Java 3.0
 * Microsoft Software Development Kit for Java 3.1
 * Microsoft Software Development Kit for Java 3.2
 * Microsoft Java Virtual Machine

-



This article was previously published under Q179854



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.0 or later virtual machine. 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).

