Hi Can any one help me out how to connect to sqlserver 2000 thru type 4 driver(java native driver) i have downloaded the driver from (.jar file) jtds site and added it into my classpath. code - class.forName("Net.sourceforge.jtds.jdbc.Driver") SourceURl="jdbc:jtds:sqlserver/server:1433/admin; user="sa" password="" Connection con=DriverManager.getConnection(SourceURl,user,password) --- when i execute the program, "NO SUITABLE DRIVER AVAILABLE" message is printing in the exception --prabhu
Why do I get a "java.sql.SQLException: No suitable driver" when trying to get a connection? The "No suitable driver" exception is thrown by the DriverManager when none of the registered Driver implementations recognizes the supplied URL. This means that you either did not register jTDS with the DriverManager (by doing a Class.forName("net.sourceforge.jtds.jdbc.Driver") first) or you mistyped the URL (e.g. "jbdc:jtds:..." instead of "jdbc:jtds:...").