This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes SQL server weird connection problem-Pls help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL server weird connection problem-Pls help" Watch "SQL server weird connection problem-Pls help" New topic
Author

SQL server weird connection problem-Pls help

asda asda
Greenhorn

Joined: Mar 31, 2008
Posts: 1
I m using SQL server 2005 express. My default logon mode setting is set to-SQL server authentication and I can logon to using SQL server management studio express always. I enabled TCP/IP from SQL server configuration manager. The sqljdbc.jar (JDBC driver) is set correctly in classpath and 1433 port is allowed in windows firewall. YET, I can�t connect to sql server using the following code-

My host name is- Tanvir. So, in management studio express the server name is shown- TANVIR\SQLEXPRESS
When I run the code it says-The TCP/IP connection to the host has failed.
Java.net.connectException:Connection Refused: Connect
One more thing, though 1433 port is allowed in windows firewall, I can�t connect to that port using telnet (e.g. telnet <server_host> 1433).I even disabled firewall and tried but in vain. PLEASE help me any brother.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

"asda asda"

Please review the JavaRanch Naming Policy and update your name to something more appropriate than you chose when you signed up.

-Scott


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL server weird connection problem-Pls help
 
Similar Threads
SQLServerException - could not connect to the host on port 1433
JDBC for Android not connecting
Exception during connecting to sql server2005
Trouble Connectiing
SQL Server - netbeans Connection problem