Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

SQL Server JDBC Connection Problem

  Asked By: Kuhaylah    Date: Jun 07    Category: Java    Views: 1026
  

According to this syntax:

Class.forName
("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
Connection c = DriverManager.getConnection
("jdbc:microsoft:sqlserver://DEV-
ACC:1433;DatabaseName=dev",user,password);

what should I put instead of DEV-ACC if my server name \\HOME\EHSAN

for example the below code has got problems and is not working

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection c = DriverManager.getConnection
("jdbc:microsoft:sqlserver://HOME/EHSAN:1433;DatabaseName=roshd","ehs
an","ehsan");

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Lewis Welch     Answered On: Jun 07

Connection c =
DriverManager.getConnection("jdbc:microsoft:sqlserver:EHSAN:1433;"roshd","ehsan"\
,"ehsan");

 
Didn't find what you were looking for? Find more on SQL Server JDBC Connection Problem Or get search suggestion and latest updates.




Tagged: