aspose file tools*
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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem in connecting sql 2005" Watch "problem in connecting sql 2005" New topic
Author

problem in connecting sql 2005

shashi booshan
Greenhorn

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;
debug:
"



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

Thanks


Regards
shashi

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;"


Shailesh


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