I am not able to connect to MS SQL 7.0 database over the internet. My
application was developed using jdk 1.3. The Webserver which hosts the
applet(Server from the .jar file gets downloaded to the client machine) and
the SQL 7.0 server database reside on the SAME MACHINE. I use type 4 driver
at the client side and no servlets are being used.
I am not able to connect to the database over the Ineternet. Do I have to
use additonal settings , to connect to a database over the internet?
The .jar file gets downloaded to the client machine, but when an attemt is
made to connect to the databse .... the following exceptions are thrown at
the Java Console
Java(TM) Plug-in: Version 1.3.0-C
Using JRE version 1.3.0 Java HotSpot(TM) Client VM
User home directory = C:\WINNT\Profiles\xyz
Proxy Configuration: no proxy
JAR cache enabled.
java.sql.SQLException: Connection refused: no further information
at com.inet.tds.TdsDriver.createSQLException(TdsDriver.java)
at com.inet.tds.TdsDriver.connect(TdsDriver.java)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(UnknownSource)
at rbin.netbws.general.Gen_System.getConnection(Gen_System.java)
at
rbin.netbws.dataObjects.UserDataObject.checkIfValidUser(UserDataObject.java)
at rbin.netbws.control.Ctr_Logon.getUserData(Ctr_Logon.java)
at
rbin.netbws.control.Ctr_Logon$actConnectIfValid.actionPerformed(Ctr_Logon.ja
va)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
> I am not able to connect to MS SQL 7.0 database over the internet. My
>
> java.sql.SQLException: Connection refused: no further information
Is there a firewall between the client machine and the server? It
doesn't matter if the http server and the SQL server are on the
same machine: if you are trying to make a JDBC connection directly
from the client to the SQL server, then you must be able to create
a TCP connection to the appropriate port, usually 1433.
Security-wise, it is a huge mistake to allow direct access to the
SQL Server over the open Internet, unless protected by a VPN.
Can you telnet to port 1433 from the client?
--
Curt Hagenlocher
cu...@hagenlocher.org