This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes SQL Server - netbeans Connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Server - netbeans Connection problem" Watch "SQL Server - netbeans Connection problem" New topic
Author

SQL Server - netbeans Connection problem

Hossam El-Gazzaz
Greenhorn

Joined: Oct 22, 2008
Posts: 20
i'm trying to have a connection my abblication through netbeans and SQL server Express 2008
1- i downloaded the sqlserver JDBC drivers
2- i added it to the IDE
3- i checked my firwall and opend the port 1433
4- checked the sql configurion and enabled the TCPIP protocol
5- by using the msconfig command i checked the sql server service is running

and at last there is and exception

SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. 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'm trying to solve it
i really dont remember the number of actions i did to solve this problem
i wish i could find help
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

Where are the authentication details to the server ?? You have'nt provided that in the connection string.

Try below link

http://lijinjoseji.wordpress.com/2008/03/31/possible-solutions-for-jdbc-sql-server-connection-problem/

OR

http://www.devx.com/dbzone/Article/33681

Cheers,

Ujjwal B Soni

<baroda>
<gujarat>
<india>
<919998971048>


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Hossam El-Gazzaz
Greenhorn

Joined: Oct 22, 2008
Posts: 20
thanks ujjwal

i use windows authuntication

i add this to the connection string

integratedsecurit = true

so i maked it before

any other suggestions
Hossam El-Gazzaz
Greenhorn

Joined: Oct 22, 2008
Posts: 20
okay there is 2 news one is good and other is bad

the first problem solved
but a second problem aroused

the jdbc driver dosnt support the integrated authuntication
so we used the dll file comes with the installation

i'm using a netbeans IDE so i wand to cearte a new connection

but it always fail

so pleas tell me how to solve this problem

thank you


ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

You are programming in java right ? If yes then java supports jar files as libraries not DLL files. And, using windows authentication in SQL server is dangerous in terms of security concerns. So, i would suggest that you install the SQL Server in mixed mode authentication.

Cheers!!!

Ujjwal B Soni
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

ujjwal soni wrote:Hi,

You are programming in java right ? If yes then java supports jar files as libraries not DLL files.

...unless your Java code calls native code, as it does when trying to use MSSQL driver and Windows Integrated authentication.

I would second your concerns about using Windows Integrated security in the first place though.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Server - netbeans Connection problem