jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 1082

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
I agree. Here's the link: http://aspose.com/file-tools
subject: problem in connecting sql 2005
It's not a secret anymore!