RE: SQL2005 JDBC ClassNotFoundException
- From: evanba@xxxxxxxxxxxxxxxxxxxx (Evan T. Basalik (MSFT))
- Date: Tue, 02 May 2006 15:54:57 GMT
The KB article you referenced is refering to the SQL2000 JDBC driver. Unfortunately, I am not aware of an updated one yet.
This is the Class syntax for 2005: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
This is the Class syntax for 2000: Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Note the subtle difference in order between jdbc and sqlserver.
Evan
--------------------
Thread-Topic: SQL2005 JDBC ClassNotFoundException
thread-index: AcZtfd/v+5BFGOD1SmGzQgBp94Tzdw==
From: =?Utf-8?B?UnlhblM=?= <RyanS@xxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: SQL2005 JDBC ClassNotFoundException
Date: Mon, 1 May 2006 17:18:02 -0700
I've downloaded the SQL2005 JDBC and extracted it to a path that is in my
CLASSPATH. I then used the sample microsoft java code at
http://support.microsoft.com/default.aspx?scid=kb;en-us;313100 to output the
driver name/version and database name/version. When I execute the code with
"java -cp . <classfile>", I get th error: java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLServerDriver. If I execute it with just
"java <classfile>" I get the error: java.sql.SQLException: No suitable driver.
I've even tried putting the JAR in the same folder as the class with no
success. I read some other posts about similar issues, and they noted 2
other JAR files that were not in the package that I downloaded from the
Microsoft site. All I have is "sqljdbc.jar".
Any ideas where I might be going wrong? Thanks!
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
.
- Prev by Date: RE: Is there any way to force JDBC connection to use English?
- Next by Date: RE: Data conversion error
- Previous by thread: RE: Is there any way to force JDBC connection to use English?
- Next by thread: RE: Data conversion error
- Index(es):
Relevant Pages
|