jdbc connection problem
From: Kavindra Malik (kavindra_malik_at_hotmail.com)
Date: 08/09/04
- Next message: Roger Redford: "Help with jdbc install please. Oracle 817 on XP"
- Previous message: MAB: "Resultset from Java Stored Procedure"
- Next in thread: ohaya: "Re: jdbc connection problem"
- Reply: ohaya: "Re: jdbc connection problem"
- Reply: Manfred Rosenboom: "Re: jdbc connection problem"
- Reply: deckdeck: "Re: jdbc connection problem"
- Reply: kavindra malik: "Re: jdbc connection problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 09 Aug 2004 20:27:44 GMT
I am a beginner - trying to get going with JDBC programming, but having a
difficulty getting the connection setup right. Have spent tons of stuff
reading - but obviously do not get it - and would appreciate any help you
may be able to provide.
The setup: Windows XP; Oracle 10g PE.
The key problem seems to be that I do not know what goes into the URL parto
of getConnections(). I've read many examples - but still do not get that
part right.
The guess at URL I took was: jdbc:oracle:odbc:@orcl:Oracle - but am not sure
about. My database name is orcl. I do not know the port # - the EM is at
port 5500 and host id is 192.168.1.100. I do not care if it is an ODBC
driver or another.
Any help would be appreciated. Thanks,
kavindra
_________________________________________-
Here are relevant pieces of my code:
-------------------------------------------------------
import oracle.jdbc.driver.*;
...
static Connection getDatabaseConnectionORC() throws SQLException {
try {
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection("jdbc:oracle:odbc:@orcl:Oracle",
"SYS", "ADMIN"); << This is the statement that fails>>
return con;
} catch (Exception e) {
throw new SQLException("Error loading JDBC Driver");
}
}
- Next message: Roger Redford: "Help with jdbc install please. Oracle 817 on XP"
- Previous message: MAB: "Resultset from Java Stored Procedure"
- Next in thread: ohaya: "Re: jdbc connection problem"
- Reply: ohaya: "Re: jdbc connection problem"
- Reply: Manfred Rosenboom: "Re: jdbc connection problem"
- Reply: deckdeck: "Re: jdbc connection problem"
- Reply: kavindra malik: "Re: jdbc connection problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]