Re: SQL Server 2005 JDBC Driver. Old jars in classpath?
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
Richard wrote:
I am want to use the 2005 driver to connect to a SQL Server 2000 database.
Currenlty, I can not connect to my 2000 database with the sqljdbc.jar. I
am using the new driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
I keep getting the message "No suitable driver" from the SQL Exception.
This occurs when only the sqljdbc.jar file is in my classpath.
Then when I add msbase.jar; msutil.jar, and mssqlserver.jar to my classpath,
then my program will connnect.
I can not find any documentation, in the 2005 jdbc driver, that state that
these files are not required.
Hi. You need to change your *URL* and driver class name to the new
driver and it's form of URL. eg:
Properties props = new Properties();
Driver d = new com.microsoft.sqlserver.jdbc.SQLServerDriver();
props.put("user", "joe");
props.put("password", "joe");
Connection c = d.connect("jdbc:sqlserver://joemachine:1433", props );
HTH,
Joe Weinstein at BEA Systems
.