Naturally I am stuck at the beginning.
I am trying to figure out the URL that I need in my
JAVA class.
I am using the free limited version of Oracle Databse XE 11.2
I am reading
http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html
and am looking at
Where the URL is of the form:
jdbc:oracle:<drivertype>:@<database>
When I was using MySQL this worked fine
String url = "jdbc:mysql://localhost/visualcafe";
based on what I read at
http://docs.oracle.com/cd/B25329_01/doc/appdev.102/b25320/getconn.htm#CACGJJFE
down where the heading is Specifying Database URLs
but for Oracle I think I start out with
String url = "jdbc:oracle:
but I have little clue what the 'drivertype' should be. I am guessing thin
and the database? Well I understand you only have one default database with "Oracle Databse XE 11.2" but I am unsure of the name. I am guessing it is XE
but I think I can skip it all together.
If my guesses are correct then I think I need something like this"
String url = "jdbc:oraclel:thin";
or
String url = "jdbc:oraclel:thinRod/testOracle";
And that leads to the connection.
for MySQL this worked
Connection aConnection = DriverManager.getConnection(url, "root", "testmysql");
but for Oracle I am puzzled.
When I went to the 'Get Started with Oracle Database 11g Express Edition'
I created for Database User name 'Rod'
and for the password testOracle
So I don't really know what values I put in here
I am guessing
Connection aConnection = DriverManager.getConnection(url, "Rod", "testOraclel");
or maybe because I am using the Oracel Express 11g I can get away with just
Connection aConnection = DriverManager.getConnection(url");