I HATE it when I have tried and tested code working that just mysteriously stops working. This particular time the problem lies around OLEDB access to Excel. I was doing a simple Select * from [Sheet1$] when all the sudden I started getting this ugly, useless error:
System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open() at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
I did a lot of research and finally ended up with a solution. My server automatically downloaded and installed some security update from Microsoft that reset directory permissions. I ran aspnet_regiis.exe -i from the command prompt and the problem was resolved. Thank goodness I didn't waste any eextra time trying to figure this one out!