• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems with microsoft excel driver

 
vijayalakshmi sundararajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 395
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think you need to create a File DSN and use it in URL.
Cheers.
 
vijayalakshmi sundararajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I tried doing it but still I get the same error message
vijju
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic