This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes problem in connecting sql 2005 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem in connecting sql 2005" Watch "problem in connecting sql 2005" New topic

problem in connecting sql 2005

shashi booshan

Joined: Jun 13, 2008
Posts: 14
Hi guys this is my program.I am using netbeans6 IDE and Microsoft sql driver for JDBC. I am trying connect to the SQL 2005 database.I have added the Driver in the application by right click in project ---> Properties -----> Add jar Files.

I am getting this Exception
"Exception No suitable driver found for jdbc.sqlserver://localhost:1433;databaseName=Project_Airways;user=sa;password=sql2005;

Is there anythin wrong in adding the Driver.Please let me know.
I am struck. Please help me.



But when i run the progam through Netbeans IDE

Thanks & Regards
- Shashi
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

Check the URL of connection string

String connection = "jdbc.sqlserver://localhost:1433;"

jdbc and sqlserver are separated by a . (dot), Use colon : instead.

String connection = "jdbc:sqlserver://localhost:1433;"


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
wood burning stoves
subject: problem in connecting sql 2005
Similar Threads
exception while running my first jdbc code
No access to SQL Express 2005/2008 database
Not able to connect to MS SQL 2005 Evaluation version
SQL Server 2008r2 Connection Failed
Problem with Connectivity