ODBC : Error in connecting to already open excel file

A

arunpj

I have a webservice which is trying to open ODBC connectio n to an
excel source. This works in case the excel is not opened. The same code
fails when the excel is opened with
Error :

Error in QueryThreadProc
System.Data.Odbc.OdbcException: ERROR [HY000] [Microsoft][ODBC Excel
Driver] Cannot open database '(unknown)'. It may not be a database
that your application recognizes, or the file may be corrupt.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Excel Driver] Cannot open database
'(unknown)'. It may not be a database that your application
recognizes, or the file may be corrupt.
at System.Data.Odbc.OdbcConnection.Open()


The connection string used is

DBQ=C:\enlistments\maestro\Northwind Excel Sample.xls;DRIVER=Microsoft
Excel Driver (*.xls);ReadOnly=0


PS : the same code works when i am execute as a Console App, But
fails in the webservice. I have made sure that the webservice user
context has all privileges

Appreciate any help towards this
Regards
Arun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top