Win a copy of Kotlin for Android App Development this week in the Kotlin 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

java.net.ConnectException:  RSS feed

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to make method to establish connection with

sql server 2000

without DSN.But i am getting exception.I have tried on net but not found solution.
My server is running.
I checked in server network utility.Port no is correct(1433).



The exception is :
SQLException : com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect
 
Bartender
Posts: 2651
18
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible that TCP/IP is not enabled in your SQL Server,
or that there is something wrong with your computer. Is it plugged into a network?

From the error message, the first option is more likely.

See also:
http://forums.sun.com/thread.jspa?messageID=4385984#4385984

 
faisal hameed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read this but still there is same exception.
My firewall is also turn off and i tried to telnet this port no(1433).The result is

C:\Documents and Settings\Administrator>netstat

Active Connections

Proto Local Address Foreign Address State
TCP faisal:1129 localhost:1130 ESTABLISHED
TCP faisal:1130 localhost:1129 ESTABLISHED
TCP faisal:1215 localhost:1216 ESTABLISHED
TCP faisal:1216 localhost:1215 ESTABLISHED
TCP faisal:5152 localhost:1374 CLOSE_WAIT
TCP faisal:1137 cs121.msg.ac4.yahoo.com:5050 ESTABLISHED
TCP faisal:1217 sip3.voice.re2.yahoo.com:5050 ESTABLISHED
TCP faisal:2869 192.168.1.1:1032 CLOSE_WAIT

C:\Documents and Settings\Administrator>telnet 127.0.0.1 1433
Connecting To 127.0.0.1...Could not open connection to the host, on port 1433: C
onnect failed
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!