|  Login
July 23, 2008  
Blog
Minimize
You must be logged in and have permission to create or edit a blog.
  
 
Search
 
When Good Code Goes Bad
Minimize
Location: BlogsLiving in Software Development    
Posted by: host 9/1/2007 4:27 PM

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!

Permalink |  Trackback

Your name:
Title:
Comment:
Add Comment   Cancel 
Blog
Minimize