Asp.net Access Unspecified Error
Contents |
here for a quick overview of the site Help system.data.oledb.oledbexception error Center Detailed answers to any questions you might have Meta
Document Settings\servername\aspnet\local Settings\temp
Discuss the workings and policies of this site About Us Learn more about Stack
System.data.oledb.oledbexception In C#
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask http://forums.asp.net/t/1128791.aspx?unspecified+error+ 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 4 We http://stackoverflow.com/questions/472079/c-asp-net-oledb-ms-excel-read-unspecified-error 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 pool, DbConnection owningObject) at System.Data.ProviderBase
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/96150/oledbconnection-open-generates-unspecified-error the workings 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 https://bytes.com/topic/asp-net/answers/344290-oledbexception-0x80004005-unspecified-error Questions Jobs Documentation Tags 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 unspecified error each other. Join them; it only takes a minute: Sign up OLEDBConnection.Open() generates 'Unspecified error' up vote 2 down vote favorite 1 I have an application that uploads an Excel .xls file to the file system, opens the file with an oledbconnection object using the .open() method on the object instance and then stores the data in a system.data.oledb.oledbexception unspecified error database. The upload and writing of the file to the file system works fine but I get an error when trying to open the file on our production server only. The application works fine on two other servers (development and testing servers). The following code generates an 'Unspecified Error' in the Exception.Message. Quote: System.Data.OleDb.OleDbConnection x = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + location + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'"); try { x.Open(); } catch (Exception exp) { string errorEmailBody = " OpenExcelSpreadSheet() in Utilities.cs. " + exp.Message; Utilities.SendErrorEmail(errorEmailBody); } :End Quote The server's c:\\temp and c:\Documents and Settings\\aspnet\local settings\temp folder both give \aspnet full control. I believe that there is some kind of permissions issue but can't seem to find any difference between the permissions on the noted folders and the folder/directory where the Excel file is uploaded. The same location is used to save the file and open it and the methods do work on my workstation and two web servers. Windows 2000 SP4 servers. c# debugging connection-string xls oledbconnection share|improve this question edited N
Post your question and get tips & solutions from a community of 418,430 IT Pros & Developers. It's quick & easy. [OleDbException (0x80004005): Unspecified error] P: n/a Jim McGivney ASPX page from VS.net-C# on host's computer using oleDataAdaptor to connect to Microsoft Access database. The page loads, but when connection to the database is attempted to fill a datagrid the following error is generated. Any help would be appreciated. Thanks, Jim Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Unspecified error Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [OleDbException (0x80004005): Unspecified error] System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20 System.Data.OleDb.OleDbConnection.InitializeProvid er() +57 System.Data.OleDb.OleDbConnection.Open() +203 System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 Win0905.AnteEditIden.Page_Load(Object sender, EventArgs e) +62 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750 Nov 19 '05 #1 Post Reply Share this Question 7 Replies P: n/a Ken Cox [Microsoft MVP] Hi Jim, You might want to check whether th