Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error Reading Excel Files in Unix....

843859Sep 25 2007 — edited Sep 26 2007
Hi All,
i wrote a logic which uses a Excel file as a database and reads data from it. i executed the logic successfully in my local system which is using windows xp as an operating system.but when i uploaded the code in the client's server which is running on the unix platform.i got and an exception which is

java.lang.NullPointerException
sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
java.sql.DriverManager.getConnection(DriverManager.java:525)
java.sql.DriverManager.getConnection(DriverManager.java:193)
project.server.Reports.ExcelReport.combineReport(ExcelReport.java:96)
....................
......................
like this i am getting error
The code is:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + "Name of the file");

is there any way to solve this problem.pls guide me to solve this problem.
Thanking You,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2007
Added on Sep 25 2007
3 comments
239 views