Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in connecting sql 2005

 
shashi booshan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic