How to Connect the Sql Server with java using netbeans

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muthulk2
    New Member
    • Feb 2014
    • 13

    How to Connect the Sql Server with java using netbeans

    i want to connect sql server with my java project but i have got error like this

    com.microsoft.s qlserver.jdbc.S QLServerExcepti on: The port number 1433/tour_db is not valid.

    this is my code:

    Class.forName(" com.microsoft.s qlserver.jdbc.S QLServerDriver" );
    Connection con=DriverManag er.getConnectio n("jdbc:sqlserv er://localhost:1433/tour_db");
Working...