Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MS-SQL database instance connection

Hardy Chou
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, currently i am given this db account, lets say ABC\DEF with DEF as the
instance, and i also have the username and password. however, i dun
understand how to connect to that server. below is the code I use. do i set
the url correctly?
String url = "jdbc:microsoft:sqlserver://ABC/DEF:1433";
String username= "eventsappdev" ;
String password= "hardyboys" ;
con = DriverManager.getConnection(url,username,password);
stmt = con.createStatement();
PS: I am using msbase.jar, msutil.jar, mssqlserver.jar from microsoft. Tomcat 4.0.4 and remote MS-SQL db server.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic