Asp.net Unspecified Error
Contents |
One games Xbox 360 games PC system.data.oledb.oledbexception unspecified error games Windows games Windows phone games Entertainment All
System.data.oledb.oledbexception Unspecified Error C#
Entertainment Movies & TV Music Business & Education Business Students &
System.data.oledb.oledbexception Unspecified Error Excel Upload
educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security
Unspecified Error While Opening Oledb Connection
Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft system.data.oledb.oledbexception (0x80004005) Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
One games Xbox 360 games PC system.data.oledb.oledbexception error games Windows games Windows phone games Entertainment All document settings\servername\aspnet\local settings\temp Entertainment Movies & TV Music Business & Education Business Students & oledbexception error codes list educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security https://support.microsoft.com/en-us/kb/825738 Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft https://support.microsoft.com/en-us/kb/830133 Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/472079/c-asp-net-oledb-ms-excel-read-unspecified-error and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags http://www.codeproject.com/Questions/125539/Unspecified-Error-OleDbException-was-unhandled-by Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only unspecified error takes a minute: Sign up C#/ASP.NET Oledb - MS Excel read “Unspecified error” up vote 5 down vote favorite 4 We have a C#/ASP.NET (2.0) application running on IIS 6 on Windows Server 2003 Enterprise Edition. This application reads Excel files using OleDb, but there are instances when we get an "Unspecified Error" exception thrown from within the application. The system.data.oledb.oledbexception unspecified error file is stored in the temporary directory by our file upload code before opening. Since we have anonymous access enabled in IIS and since we also use impersonation in web.config, the folder C:\Windows\Temp\ has the proper permissions for the Internet Guest User Account (IUSR_[MachineName]) to be able to create, modify and delete files there. OleDb connection string: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Windows\Temp\tmp123.tmp.xls; Extended Properties="Excel 8.0;HDR=Yes;IMEX=1;" [The "Data Source" attribute above would change for every file.] The stack trace of the exception is: System.Exception: FileParsingFailed ---> System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() Workaround: So far, the only workaround we could come up with was to do an iisreset (we also have application pool recycling configured to happen once everyday in IIS, but it doesn't seem to help since the issue sometimes persists over several consecutive days). While this is not a good thing to do, what makes it worse is that we have other applications on the
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... C# questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ Unspecified Error - OleDbException was unhandled by user code, Help! Rate this: Please Sign up or sign in to vote. See more: VB Access VB.NET Hi, I get a problem with "Unspecified Error : OleDbException was unhandled by user code". I have a class for retriving datas from access database to datagridview. In rowpostpaint event of datagridview, it will call and get a returning value from a function. So, if i do something to refresh the datagridview repetely for a while, it will occure an error like this. Here is codes in DataGridViewRowPostPaint:
Private Sub gvemployee_RowPostPaint(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles gvemployee.RowPostPaint 'Try If Not e.IsLastVisibleRow Then If cancelselectedCell = 0 Then gvemployee.Rows(e.RowIndex).Cells(0).Value = e.RowIndex + 1 Dim theID As Integer theID = gvemployee.Rows(e.RowIndex).DataBoundItem("emp_id") Dim dr As OleDbDataReader dr = getState(theID) If dr.Read Then If dr("working_state") <> "" Then If dr("working_state") = "ทำงาน" Then gvemployee.Rows(e.RowIndex).Cells(4).Value = True ElseIf dr("working_state") = "ลาป่