Connecting Oracle8i with Java
Bear this in mind that whenever you use Oracle DON'T use Microsoft provided Driver. Always go for the one provided by Oracle itself e.g. "oracle odbc driver"
Next is instead of using the following:
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:thin@localhost:1521:orcl";
You can also use
Class.forName ("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin@localhost:1521:orcl";
Next is instead of using the following:
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:thin@localhost:1521:orcl";
You can also use
Class.forName ("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin@localhost:1521:orcl";
As far as the Datasource name is concerned, the default datasource name is
beq-local.world PS:Oracle is bit tough when it comes to running server on Windows box. Anyway the best pair for both Oracle and Windows is "Oracle 8.0.5 for Windows NT" and "Windows NT 4.0 Server" respectively. Also the old Oracle Developer works quite smoothly with this combination.
beq-local.world PS:Oracle is bit tough when it comes to running server on Windows box. Anyway the best pair for both Oracle and Windows is "Oracle 8.0.5 for Windows NT" and "Windows NT 4.0 Server" respectively. Also the old Oracle Developer works quite smoothly with this combination.
Comments