Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection To Oracle Using Connection Manager

145678Jan 13 2002
Since JDeveloper is based on JBuilder I thought this might be
a good place to post this question.

I would like to use JBuilder's DataExpress components to
connect to an Oracle database using Oracle's connection
manager. The form for a standardconnection using jBuilder is something like:

db1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:oracle:thin:@host:1521:ORACLE_SID", "user", "password", false, "oracle.jdbc.driver.OracleDriver"));

This connection string works fine.

The format for a connection string using the standard SQL
classes and connecting to the database using connection
manager is something like:

try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String connString =
"jdbc:oracle:thin:@(description=(address_list=" +
"(address=(protocol=tcp)(port=1630)(host=bill))" +
"(address=(protocol=tcp)(port=1521)(host=bill)))" +
"(connect_data=(sid=oralin))" +
"(source_route=yes))";
conn = DriverManager.getConnection(connString, "scott", "tiger");
stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery ("Select * from scott.dept");
rs.next();
String xStr = rs.getString(1);

This connection works fine....

You have to specify the connection manager routing in the string.

Questions:
--------------
Does anyone have an example of what a ConnectionDescriptor looks like using JBuilder's data Express components if I want to connect to the database using Oracle's connection manager?

Does JDeveloper include Borland's dataexpress components? How can this be done in JDeveloper? Maybe I will switch the Jdev.

Can it even be done? Is there another approach to use JBuilder's DataExpress class?

Using JBuilder4 and Oracle 8.1.7 (on Linux)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2002
Added on Jan 13 2002
1 comment
397 views