ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OleDBConnection.Open() blocks with 100% CPU (https://www.excelbanter.com/excel-programming/383135-oledbconnection-open-blocks-100%25-cpu.html)

Alexander Pachwald

OleDBConnection.Open() blocks with 100% CPU
 
Hi!

I create a database connection to an Excel 2007 .xlsx file using the
following connection string:

string cs = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"Data Source=" + filename +
";Extended Properties=\"Excel 12.0;HDR=YES\";";

After instantiating an OleDbConnection, I call connection.Open().

This all works fine for a simple Excel file with three sheets, two of them
empty. A more complex version with eight filled sheets (no calculation on
them!) makes the Connection.Open() command block using 100% CPU. When I
execute the code while the file is opened in Excel 2007, everything works
fine.

Any suggestions?

Thanks for your attention,
Alex




All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com