Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> oracle jdbc abd OpenOffice 2.0

oracle jdbc abd OpenOffice 2.0

From: Harald Finster <hfinster_at_gmx.de>
Date: Tue, 08 Nov 2005 21:46:43 +0100
Message-ID: <dkr2rj$bgp$02$1@news.t-online.com>


Hello,

in the course of finding out how to connect an Oracle database to OpenOffice 2.0 via JDBC I read a posting in this group:

"I use JDBC and it works flawlessly. Unfortunately, I'm running Linux."

but how?

I always get the error message:

Error while connecting to data source
io exception: The Network Adapter could not establish the connection

error code 17002
io exception: The Network Adapter could not establish the connection

I entered the following information into the connection form:

Name of database: db1
Server URL: localhost
Port number: 1521

Driver class: oracle.jdbc.driver.OracleDriver (Test class is ok)

A while ago, I wrote my own java class connecting successfully to the same database:

String driverName = "oracle.jdbc.driver.OracleDriver"; String databaseURL = "jdbc:oracle:oci8:@"; DriverManager.registerDriver( (Driver)Class.forName( driverName ).newInstance() ); conn = (OracleConnection)DriverManager.getConnection ( databaseURL, userName, password );

So, I think, the driver should work.

I also tried to use jdbc:oracle:oci8:@ as "Server URL" but got an error message about a malformed URL:
io exception: invalid connection string format, a valid format is "host:port:sid"

Any hint appreciated!

Greetings Harald Received on Tue Nov 08 2005 - 14:46:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US