LinqToExcel
LinqToExcel copied to clipboard
OleDbException: system resource exceeded
Hi,
Thanks for the great library.
I've been running into an issue when running approx 500 queries against the same spreadsheet by effectively calling WorksheetRangeNoHeader in a loop with different parameters.
I get an OleDbException ("System resource exceeded") for some spreadsheets, but not all. I would guess this is an issue with Ace getting overloaded with connections. What I'd like to do is share the connection across all queries as it's always against a single sheet.
Can't see anything in the API to allow me to do that? Any suggestions?
Currently it's not possible to reuse the same connection.
I don't have the bandwidth to add this functionality, but if you want to work on a pull request for it, then a couple places you'll want to work on in the code is in the ExcelQueryExecutor and the ExcelQueryArgs.
Here's the line of code that's currently creating and opening a connection: https://github.com/paulyoder/LinqToExcel/blob/master/src/LinqToExcel/Query/ExcelQueryExecutor.cs#L167