This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Exception - To connect  excel  sheet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Exception - To connect  excel  sheet" Watch "Exception - To connect  excel  sheet" New topic
Author

Exception - To connect excel sheet

bala kumar
Greenhorn

Joined: Sep 13, 2007
Posts: 10
i got the following error when i get the data from XL sheet to store the data into oracle db in LINUX .

Code:
String path = "/home/nfsmnt/resource_uploads/web_links/"+fileName;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection("jdbcdbcriver={Microsoft Excel Driver (*.xls)};DBQ="+path+";DriverID=22;READONLY=false","","");
Statement stmt = connection.createStatement();


Exception:

java.lang.NullPointerException at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436) at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.thomsonhighereducation.DAO.ResourceOrderDAO.addWeblinkData(ResourceOrderDAO.java:2239) at
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception - To connect excel sheet
 
Similar Threads
[ODBC] Connection not Open
Connectting to MS Access in Remote machine without DSN
Connecting To Database
Data source name not found and no default driver specified
how to connect ms acess in java