public static void main(String args[]){ JdbcOra j = new JdbcOra(); } }
It gives me the exception:
[Microsoft][ODBC driver for Oracle][Oracle] java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle] at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source) at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Sour at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at JdbcOra.<init>(JdbcOra.java:9) at JdbcOra.main(JdbcOra.java:27)
I couldn't understand what this exception means.Is this due to any driver missing??
I suggest to debug this code move the code out from constructor. Move the getting connection to a different method and execution of the query to a different method. Then you might be able to isolate the problem better.
Your example solves the issues with Oracle Thin driver. Even though thatÂ’s a better solution and guaranteed to work the original question uses the ODBC-JDBC Bridge.
In the oracle "scott" schema are you sure that the table is called "Employee"? I thought it was "Emp". I don't have a sample db installed here to check.
I am able to execute MS Access database but I cudnt do it for Oracle.Is there any specific driver that i have to install to execute Oracle database??If so where can I get that for free :-)?
Also to run Oracle using Jdbc-Odbc bridge do I need to install any driver but to execute MSAccess I didn't install anything.