Saturday, 24 August 2013

Unable to connect to local SQL Server

Unable to connect to local SQL Server

I'm unable to connect to a local SQL Server with jdbc. This server is
authenticated by Windows Authentication. One thing to mention is that I
successfully connected to a remote SQL Server with SQL Server
Authentication.

My code:
String url =
"jdbc:sqlserver://localhost\\SQLEXPRESS;integratedSecurity=true;databaseName=TP3S;";
String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
Connection conn = DriverManager.getConnection(url);
I have enabled TCP/IP:

Any ideas? Thanks!

No comments:

Post a Comment