This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Problem in connecting to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem in connecting to database" Watch "Problem in connecting to database" New topic
Author

Problem in connecting to database

Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 148
i tried to connect database (sql server 2000) through servlet.But its giving me "[Microsoft][sqlserver jdbc driver] error establishing socket"

I have given correct Port number(1433) and server name...

Please help me solving this issue...


Even its not launching within the server...


Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Is your server configured to accept TCP/IP traffic? Is your server configured to allow SQL Server authentication? Is there any sort of firewall between your application and the server? Is the server running?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 148
My server is not in n/w.yes i allow sql authentication.

What you mean by firewall between application and server???
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 148
Please help me with some solution....
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


My server is not in n/w

I don't understand what "n/w" means.


yes i allow sql authentication.

OK, so is your server configured to accept TCP/IP traffic?


What you mean by firewall between application and server???

Just that - are these any firewalls between whatever machine your application runs on and whatever machine your SQL Server instance lives on.

Also, is your SQL Server 2000 instance patched to the latest version? Very (very!) early versions of SQL Server 2000 had issues with TCP/IP DLLs missbehaving.

Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 148
1. I have checked, both Server network utility and client network untility for TCP/IP port(its 1433).
2. I have turned off the wirefall.
3. Allowed exception for Port 1433(giving Name as "1433" , Port number as "1433" )
4. Now my server is not in Network , so i tried to launch the application from inside the server itself.


How to check whether it accepTCP/IP traffic?
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 148
Any help please....
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

Neeba Rebbaca wrote:1...
4. Now my server is not in Network , so i tried to launch the application from inside the server itself.
In that case, try to replace 'testserver' by '127.0.0.1'.

OCUP UML fundamental and ITIL foundation
youtube channel
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 148
Yes, i tried... but still the same problem exists...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in connecting to database
 
Similar Threads
How to import CSV file into Mysql using jsp
Access Data from Database By Submitting The select Values
iterate problem in struts2
page refresh problem
JSP attendance management project error