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 Connecting SQL Server 2000 Thru type4 Driver 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 "Connecting SQL Server 2000 Thru type4 Driver" Watch "Connecting SQL Server 2000 Thru type4 Driver" New topic

Connecting SQL Server 2000 Thru type4 Driver

prabhu kandanur

Joined: Dec 24, 2003
Posts: 14
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 -
Connection con=DriverManager.getConnection(SourceURl,user,password)
when i execute the program, "NO SUITABLE DRIVER AVAILABLE" message is printing in the exception
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

Read the FAQ.

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:...").

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Connecting SQL Server 2000 Thru type4 Driver
Similar Threads
Connection Problem
HELP please with SQL Server
Why JVM can't find my jdbc
Error connecting to MSSQL Server from Hibernate
sql exception : user property is missing ???