C#/asp.net Oledb - Ms Excel Read Unspecified Error
Contents |
here for a quick overview of the site Help system.data.oledb.oledbexception unspecified error excel Center Detailed answers to any questions you might have
Unspecified Error While Opening Oledb Connection
Meta Discuss the workings and policies of this site About Us Learn more about system.data.oledb.oledbexception unspecified error excel upload Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges system.data.oledb.oledbexception unspecified error c# 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 takes a minute: Sign up C#/ASP.NET Oledb - MS Excel read “Unspecified error” up vote 5 down vote favorite
Unspecified Error While Opening Excel Connection
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 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
360 games PC games document settings\servername\aspnet\local settings\temp Windows games Windows phone games Entertainment All Entertainment system.data.oledb.oledbexception (0x80004005) Movies & TV Music Business & Education Business Students & educators
Unspecified Error While Opening Oledb Connection In C#
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://stackoverflow.com/questions/472079/c-asp-net-oledb-ms-excel-read-unspecified-error 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 Lumia All https://support.microsoft.com/en-us/kb/825738 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
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post http://www.codeproject.com/Questions/226156/Reading-Excel-File-xls-Unspecified-Error 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 https://forums.iis.net/t/prev/1141015 Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / unspecified error 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 system.data.oledb.oledbexception unspecified error 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 Reading Excel File(.xls): Unspecified Error Rate this: Please Sign up or sign in to vote. See more: C# .NET MS-Excel Errors Hello All, I have an application that reads an excel file(.xls) but occasionally an error is thrown: Unspecified Error. I use an OleDbConnection to open a connection. OleDbCommand to execute a query. And DbDataReader to read the rows. My program logic is like this: 1. Open the excel file 2. Read each row 3. Validate each column - some validation may require opening the connection again 4. Save it to
Web Platform Installer Get Help: Ask a Question in our Forums More Help Resources Blogs Forums Home IIS.NET Forums IIS 5 & IIS 6 ASP.NET Administration Reading from an Excel file - ASP .net web application + win 2003 serv... Reading from an Excel file - ASP .net web application + win 2003 server + IIS6.0 [Answered]RSS 1 reply Last post Aug 02, 2007 09:14 AM by Hope4sun ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Advanced Search Reply sajithajose 1 Post Reading from an Excel file - ASP .net web application + win 2003 server + IIS6.0 Aug 01, 2007 05:50 AM|sajithajose|LINK Hi All, i am having some problems with reading data from an excel file (.xls) using my web application built using ASP .Net 1.0 (C#) . it works fine in windows XP (IIS 5.1). but when hosted in windows 2003 server (IIS 6.0) i am getting errors like "Could not find installable ISAM" , "Unspecified Error" etc. i am using C# OLEDB connection to establish a link with the excel file. i have tried almost all formats of connection strings. but the error occurs when Open() method of oledb connection is called. please help me to identify the cause of this error and a solution.. Thanks in advance Sajitha Jose asp.net IIS 6 Windows 2003 Reply Hope4sun 32 Posts Re: Reading from an Excel file - ASP .net web application + win 2003 server + IIS6.0 Aug 02, 2007 09:14 AM|Hope4sun|LINK Are you using extended properties in you connection string, somthing like this: Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\YOURFILE.XLS;Extended Properties=Excel 8.0; HDR=NO;" If so try putting the extended properties in quotes Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\YOURFILE.XLS;Extended Properties=""Excel 8.0;HDR=NO""" This link, thought more related to office it may point you in the right direction if the above does not work: http://support.microsoft.com/kb/209805 ‹ Previous Thread|Next Thread › This site is managed for Microsoft by Neudesic, LLC. | © 2016 Microsoft. All rights reserved. Privacy Statement Terms of Use Contact Us Advertise With Us Hosted on Microsoft Azure Follow us on: Twitter Facebook Microsoft Feedback on IIS Powered by IIS8