Monday, June 2, 2014

Create Oracle ADF business components based on Microsft SQL server

Inorder to do that, we need to connect to the Microsft SQL Server as described below

Platform - Win 7 x86 Enterprise
MS SQL Server 2008 Database Engine
JDeveloper 11.1.1.3

Oracle JDeveloper 11g uses JDBC 4.0 to connect with RDBMS since JDK1.6 supports JDBC4.0 & 
JDeveloper uses JDK 1.6 to compile all its classes. ojdbc6.jar classes to support basic 
functionality for the Thin and OCI drivers when using JDK 1.6 (JSE6) with Oracle database. 
Additional jar files are required when you use some features. See Oracle JDBC FAQ .

Well, that was of Oracle Database. MS SQL Server provides SQLJDBC4.jar class library, 
which provides support for JDBC 4.0. If you dont have this jar files, you won't be able to 
connect to MSSql server database. You can download from Microsoft.

1. Download sqljdbc4.jar from microsoft & save in filesystem.

2. Open JDeveloper & register the library file from Tool > Manage Libraries.

3. Click 'New' button by keep selecting 'User' Node.

4. In the 'Create Library' dialog click 'Add Entry' & locate your sqljdbc4.jar file & click 'Select' .

5. Optionally, you can check 'Deployed by default'.


managelibrary

6. Click OK.

7. Now, you are ready to establish connection to MSSQL Server.

8. Make sure your sqlserver engine is running & the account you are going to use for connect, is not
    locked.

9. From Database Navigator, create a new connection.

10.Next Screenshots are self explanatory except for 'Library' field where click 'Browse' & locate the jar file
     from 'Select Library' dialog.



selectLibrary

ConnectionDialog

































11. Click Test Connection to test the connection.
Reference: http://adfblogspot.blogspot.com/2012/06/connecting-ms-sql-server-database-from.html

No comments:

Post a Comment