I am writing an applet that you access through a web
browser on the internet.
The applet allows you to view data from a SQL Server
database. So the applet connects to the SQL Server thru
port 1433, which is the JDBC Driver's default. I need to
implement this applet for people who may have port 1433
closed.
Is there anyway I can specify the JDBC Driver to use port
80? Or not even having to specify a port number, so that
it searches for an available port number?
Any help would be greatly appreciated.
Thanks,
Nimalan Mahendran
Port 1433 is not at all related to JDBC. It is the port number on which
SQLServer can be reached. You can configure your server to listen to
whatever port you want. Go thru SQL Server documentation.
You can set listen port for SQLServer thru Enterprise manager.
1. open Enterprise manager.
2. expand server group.
3.right click on server and select properties.
4. on general tab, click network settings button.
5. select TCP/IP on right handside list box and click properties.
This is where you can set the listen port for SQL Server.
I hope this addresses your issue.
Sridhar Paladugu
Microsoft Developer Support
JDBC Webdata
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order
your FREE Security Tool Kit, please visit
<http://www.microsoft.com/security>.
REQUESTING - Connection to SQLServer: ICUTALK-SERVER:1433 - Database:
'grouper' as User: 'guest'...
ERROR - Connecting to SQLServer
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error
establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at SQLServerDatabase.connectSQLSever(SQLServerDatabase.java:65)
at Grouper.init(Grouper.java:66)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
>>------------------------ BEGIN: TESTING SOCKET CONNECTION
------------------------<<
REQUEST - Opening a socket to host ICUTALK-SERVER on port 1433...
ERROR - Opening a socket. Here's why:
java.security.AccessControlException: access denied
(java.net.SocketPermission ICUTALK-SERVER resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at SQLServerDatabase.testSQLServer(SQLServerDatabase.java:33)
at SQLServerDatabase.connectSQLSever(SQLServerDatabase.java:73)
at Grouper.init(Grouper.java:66)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
>>------------------------- END: TESTING SOCKET CONNECTION
-------------------------<<
sr...@online.microsoft.com (Sridhar Paladugu[CompCon tech]) wrote in message news:<qfHeTI$sBHA.1184@cpmsftngxa08>...
The best work around is to communicate with a servlet running on your host
to do all database stuff and use your applet as a client.