This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JDBC for Android not connecting

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: 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!
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic