• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC for Android not connecting  RSS feed

ahsan jafri
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using the Microsoft SQL Server JDBC Driver 3.0 (I think it's the latest).

Here is my java (android) code:

Connection conn = DriverManager.getConnection("jdbc:sqlserver://74.__.171.___:1433;DatabaseName=________;User=_____;Password=_____");

I have obviously underscored out some of the credentials. The SQL Server is 2008.

I am not able to connect, and the message I'm getting is the following:

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 74.__.171.___, port 1433 has failed. Error: "Permission denied. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.". (I have underscored out some of the IP address of course).

Keep in mind, that I am using the android emulator, API level 8 (Android 2.2). Also, this database WORKS. I have tested the TCP/IP connection in management studio and it works within seconds. I have connected with the TCP/IP protocol with 3 different applications. It all works. PLEASE HELP!
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!