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


JavaRanch » Java Forums » Databases » JDBC
Reply 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.


<b>L G Goundalkar</b><br /> <a href="mailto:lggoundalkar@yahoo.com" rel="nofollow">lggoundalkar@yahoo.com</a> <br />Sun Certified Programmer for Java 2 Platform.<br />Sun Certified Web Component Developer for J2EE.
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: problems with microsoft excel driver
 
Similar Threads
problem while reading data from excel sheet
how to write into excel sheet
excel driver
data source name too long
Exception - To connect excel sheet