Posted on: 3/15/2012 4:39:50 AM | Views : 373

My JDBC connection seems to connect but does not get past the DriverManager.getConnection() call, it just hangs forever.
I can make the connection fail by disabling the 'test' login in Management Studio, in which case I get the appropriate exception error message. The issue also happens when I try to connect as 'sa'.
I am trying (and being sorely tried) to do a test database in SQL Server Express 2008 R2 (10.50.1600) which is running on my local machine. The code is as follows:
import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class TestJDBC {     public static void main(String[] args) {         try {             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");            ...

Go to the complete details ...