aspose file tools*
The moose likes JDBC and the fly likes problems with microsoft excel driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problems with microsoft excel driver" Watch "problems with microsoft excel driver" New topic
Author

problems with microsoft excel driver

vijayalakshmi sundararajan
Greenhorn

Joined: Dec 03, 2003
Posts: 4
Hi,
I have written this code to access data from an Excel file.
///////// the code //////////////
String url = "jdbc dbc river={Microsoft Excel Driver(*.xls)};DBQ=C:\\test.xls";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =DriverManager.getConnection(url);
//////////// the exception /////////////
Exception: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
please help me out.
bye
Regards,
Vijayalakshmi
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi,
I think you need to create a File DSN and use it in URL.
Cheers.


SCJP, SCWCD
vijayalakshmi sundararajan
Greenhorn

Joined: Dec 03, 2003
Posts: 4
Hi,
I tried doing it but still I get the same error message
vijju
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problems with microsoft excel driver