Connecting to SQL 2005 Server from the Java Studio Creator - Fixing the connectivity problem
(Page 4 of 5 )
Now begins the headache of trouble shooting. From the message, it is clear enough that it is trying to connect to TC PIP port 1433, the default for SQL Server that Sun Java Studio assumes. For some (other unrelated) reason, the network port on the SQL Server is not at 1433. You can verify it by opening up the SQL server configuration tools. The network port happens to be 1864 instead of 1433. In the database URL text box change 1433 to 1864 and click on the Select button once again to open the next window, Selection Validation Tools as shown in the next picture.
Validation Table
The validation table is necessary for the IDE to make sure that a connection exists and is still valid. The application obtains its database connections from the Sun Java application server's connection pool. The application server queries the validation table to make sure that the connection is valid. The Test Connection button also does the same behind the scenes. This table must exist. Although any table can be used, it better be a table which is accessible and very small.

There is one table already selected; highlight it. The Select button becomes visible. Click this button. This opens the earlier page, Add Data Source, with the validation table information added to the form as shown.

Now is the chance to test your connection. Click on the button TestConnection and you will see the following connection status window.

Although there is a warning, this connection is still valid. Observe that the data source is added as shown. You can expand the node to display the objects as shown.

If you right click on the node Hodentek_Java you see the drop-down shown. This is yet another nice feature continued from the previous version where you can manipulate the data source you created. You will be able to see the data, if you want, and you can export the data source if you wish, or you can modify the data source.

Next: Modifying a configured data source >>
More Java Articles
More By Jayaram Krishnaswamy