aspose file tools*
The moose likes JDBC and the fly likes JDBC & SQLServer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC & SQLServer" Watch "JDBC & SQLServer" New topic
Author

JDBC & SQLServer

Curtis Nelson
Greenhorn

Joined: Dec 11, 2004
Posts: 5
Hi all,

I'm trying to connect to SQLServer, but I keep getting an exception on the following line:

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

I've downloaded and installed the JDBC driver from Microsoft, and set my classpath accordingly. Is there something else I'm missing?

Thanks,

Curtis
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Which exception? Out of memory?


http://home.arcor.de/hirnstrom/bewerbung
Curtis Nelson
Greenhorn

Joined: Dec 11, 2004
Posts: 5
I'm getting a ClassNotFoundException.

Thanks
Rick Portugal
Ranch Hand

Joined: Dec 17, 2002
Posts: 243
Sounds like a classpath issue. Double-check that the JAR is part of the classpath.


IBM 286, SCJP, SCWCD, EIEIO
Yu Tao
Greenhorn

Joined: Dec 12, 2004
Posts: 28
Originally posted by Curtis Nelson:
Hi all,

I'm trying to connect to SQLServer, but I keep getting an exception on the following line:

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

I've downloaded and installed the JDBC driver from Microsoft, and set my classpath accordingly. Is there something else I'm missing?

Thanks,

Curtis



please download JDBC driver from Microsoft.
under copy you-support(JDBC)/lib have msbase.jar mssqlserver.jar msutil.jar
copy three jar in you jdk/jre/lib/ext
that OK
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

There are different MsSqlServer versions out, which need different jdbc-drivers.
For 7.0 you may use the OpenSource FreeTTS Driver i.e.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC & SQLServer