This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes connection URL for SQLServer2008 using JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connection URL for SQLServer2008 using JDBC" Watch "connection URL for SQLServer2008 using JDBC" New topic

connection URL for SQLServer2008 using JDBC

pintu shah

Joined: Nov 12, 2010
Posts: 24
I am using Java 1.6 and SQL Server 2008 for this. I am using windows authentication to connect to MSSQL Server 2008 and windows authentication does not require any username and password.

I have used the following connection URL

private static final String CONNECTION_URL = "Driver={SQL Server Native Client 10.0.1600};Server=http://localhost:1433;Database=DataBases";

Connection conn = DriverManager.getConnection( CONNECTION_URL )

when i run the code I get following exception database is getting loaded though..

Exception in thread "main" java.sql.SQLException: No suitable driver found for Driver={SQL Server Native Client 10.0.1600};Server=http://localhost:1433;Database=DataBases
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at JDBC.TestDatabaseMetadata.main(
Jan Cumps

Joined: Dec 20, 2006
Posts: 2562

Is that a valid jdbc connection url?

OCUP UML fundamental and ITIL foundation
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: connection URL for SQLServer2008 using JDBC
It's not a secret anymore!