Friday, July 28, 2006

Sun Studio Creator to SQL 2000...amazingly easy (2004)


Connecting to SQL Server 2000 from Sun JavaTM Studio Creator



This year 2004 article was previously on my password protected site: http://www.mysorian.com/htek/.

It was amazingly simple to connect to a database on a SQL Server 2000 on the local machine to the Sun JavaTM Studio Creator. Connecting the Weblogic Workshop 8.1 application server to an SQL server was not this easy. In fact it was easier than connecting from VB/Visual Interdev to an SQL Server. When you start the Sun Java Studio Creator you will see a number of windows that come up for Project View, Properties, Palette, etc One of these windows is the "Server Navigator". Server Navigator folder structure is shown in the first screen shot.

When installed for the first time, the IDE comes up with its own "Travel" database in the POINT BASE server.



















You can add other datasources from other database servers, such as MSSQL, Sybase, Oracle, etc. All that is needed is to right click on the Data Soures node to bring up the following dialogue:

















If you click on the Add Source menu item, you will presented with the next dialogue:

Here you can name a data source( "Test Bibilo" ) for example.
You can choose the server type, in this case SQL Server
Next item is the database name, you must know what this should be before hand (If you do not know, open for example Enterprise manager and find by expanding the Databases node.
Next is the host name of the SQL Server, in this case 'localhost'(SQL Server is installed on the local machine)
The next two items are authentication information for the SQL Server, you should get it from your DataBase Manager. Database URL is an information required for the connection and this string is created by the IDE based on the previous selections depending on the type of database chosen This dialogue also shows tehe Driver Class, another piece of key inforamtion needed for making the connection. You may also test this connection before adding to the data sources folder. This is seen in the first screen shot where two datasources TestBiblio and TestPubs have been added in this fashion. Out of the box, this 'Early Access' software connects to the following databases at the indicated ports,

DB2 at port=50000
Oracle at port=1521
Pointbase Bundled at port=9092
SQL Server at port=1433
Sybase at port=5000

Jay Krishnaswamy, June 16, 2004

No comments:

DMCA.com Protection Status