Connecting to SQL 2005 Server from the Java Studio Creator - Connecting to SQL 2005 Server
(Page 3 of 5 )
The Sun Java Studio Creator is running on the same computer which also has SQL 2005 Server installed. In the servers panel at the top left, right click on the Data Sources node a to reveal the Add Data Source... hyperlink as shown.

Click on the hyperlink to reveal this next window, Add Data Source, where you can completely configure the data source with all the needed information. It comes up with a default DB2 connection. The next picture shows the default view of the Add Data Source Window.

Click on the drop-down to reveal the several different sources to which you can connect to obtain your data. The bundled database is the PointBase Java database which Sun Micro Systems has continued from the previous version. Select SQLServer in the drop-down. You need to give a name to your data source; here it is named Hodentek_Java. The name of the data source is arbitrary.

With this information you cannot browse to get a database; you must know the name of the database. You can look it up in your SQL 2005 Server Management Studio. TestWiz happens to be the name of a database on the localhost (HodentekMysorian) as shown in the picture with just one user table, Employees. For database type in "TestWiz."

Next you need to enter the authentication information, which is sa and the password (SQL Server authentication is configured for this server). Next click on the Validation Table related Select button alongside the textbox; if the information is correct, you should see a table or tables for validation. In this case it came up with this error message as shown.

Click OK to close this window.
Next: Fixing the connectivity problem >>
More Java Articles
More By Jayaram Krishnaswamy