This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC-sql server Run time error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC-sql server Run time error" Watch "JDBC-sql server Run time error" New topic

JDBC-sql server Run time error

Muhammad Uzair Baig

Joined: Mar 02, 2004
Posts: 12

I have a problem when I try to connect java and sql server 2000. An run time error is coming in my program.

Exception in thread "main" java.lang.ClassNotFoundException: new com/microsoft/jdbc/sqlserver/SQLServerDriver()
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at Test.<init>(
at Test.main(

I try all classpath first I place the msssqlserver.jar, msutil.jar, msbase.jar into jdk1.4\jre\lib\ext but the same above problem is come.
Then I make a directory in D drive d:\javasql and place all the jar files into this directory my .java and .class files also and I try these different paths

d:\javasql>set classpath=d:\msbase.jar;d:\msutil.jar;d:\mssqlserver.jar

d:\javasql>java �classpath �.;d:\msbase.jar;d:\msutil.jar;d:\mssqlserver.jar� Test

d:\javasql>set classpath=d:\..

and some different path also but the same problem exit please help me on it the program is.

Best Regards
Uzair Baig

[edited to add code tags]
[ November 28, 2004: Message edited by: Jeanne Boyarsky ]
I agree. Here's the link:
subject: JDBC-sql server Run time error
Similar Threads
Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Driver f
MS Sql server2000 connection problem
HELP please with SQL Server
Why JVM can't find my jdbc
Problems regarding MS JDBC Driver and JTDS-JDBC Connectivity for MS SQL Server 2000