Reputation: 303
im nearly becoming crazy :)
I installed a Microsoft SQL Server 2008 R2 im my network and now im tryin to connect the sql database via JAVA JDBC. Im using the Microsoft JDBC Driver v3 the sqljdbc4.jar ( http://www.microsoft.com/downloads/de-de/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707 )
Java Code:
Connection conn = DriverManager.getConnection("jdbc:sqlserver://192.168.1.144:1433;database=mydatabase;user=root;password=root");
//this line is not even printed so the problem have to be at getConnection
System.out.println("test");
The strange thing is that there is no exception appearing. Its just doing nothing. If I try it with a wrong username there is a exception so the authentication seems to work.
Maybe there is afirewall problem wich blocks the connection from the java client (OS of the server is MS Server 2008R2) ?
Hope some of you guys have an idea what can be the problem or a approach to solve this. Thanks in advance ...
Upvotes: 0
Views: 1442
Reputation: 165
Glad you were able to connect. If you were using Sun Java 6 update 29 there was a bug that prevented connections. Sun fixed the bug in the subsequent update 6 update 30. We are in the process of testing JRE 7 against the Microsoft JDBC Driver for SQL Server. You can find the latest status here - http://blogs.msdn.com/b/jdbcteam/archive/2011/11/07/supported-java-versions-november-2011.aspx
Upvotes: 1