Java
  Home arrow Java arrow Page 4 - Connecting to SQL 2005 Server from the Jav...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Connecting to SQL 2005 Server from the Java Studio Creator
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2006-08-29

    Table of Contents:
  • Connecting to SQL 2005 Server from the Java Studio Creator
  • Reviewing the Java Studio Creator IDE
  • Connecting to SQL 2005 Server
  • Fixing the connectivity problem
  • Modifying a configured data source

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    More Java Articles
    More By Jayaram Krishnaswamy


       · It is an ideal medium to develop Rich Client Applications. The database and web...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT