473,473 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

E_FAIL(0x80004005) error with Excel import

18 New Member
I am trying to do Excel Import with Oledb. It is working fine in my local machine. But when i upload it to live server, getting the below given error:

E_FAIL(0x80004005)

Any help will be appreciated. I have attached my code below,
__________________________________________________ ______

OleDbConnection ConExcl = new OleDbConnection();
string sConExcl = string.Empty;

sConExcl = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileName + @";Extended Properties=""Excel 8.0;HDR=Yes;""";

ConExcl.ConnectionString = sConExcl;
ConExcl.Open();

//This gets the all the excel sheet records in a data table
System.Data.DataTable tblCategory = new System.Data.DataTable("Category");
System.Data.OleDb.OleDbDataAdapter daSelect = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", ConExcl);
daSelect.Fill(tblCategory);
May 24 '07 #1
0 2089

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Arif | last post by:
In my C# application all queries runs well both with MS Access and SQL Server databses. But only the following query runs well on SLQ Server2000 but with MS Access gives error =>...
1
by: VB Programmer | last post by:
I am getting a "IErrorInfo.GetDescription failed with E_FAIL" error when trying to do a "Fill" on a dataadapter. Any ideas?? The SQL command seems good (to an Access db). Here is the general...
1
by: TG | last post by:
This is a snippet from my code. When I run it, I get the error message "IErrorInfo.GetDescription failed with E_FAIL(0x80004005). " I can't find anything online that helps me to understand the...
5
by: ray well | last post by:
i'm using a standard access 2000 mdb file, and i have used many before, thru ado.net when i run the DataAdapter configuration wizard, i get the following message the wizard detected the...
0
by: mkl | last post by:
Hello I use this code to read a Excel File. Dim connectString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\test\bla.xls;Extended Properties='Excel .0;HDR=YES;'"...
0
by: agent47 | last post by:
I don't know what the problem is with this query. It seems correct, but I guess it is not since it is not working. I'm using access as a database and C# language. Below is my sql text.. ...
0
by: Nathan Sokalski | last post by:
I am recieving the following error message when I call the Fill() method in ASP.NET/VB.NET: IErrorInfo.GetDescription failed with E_FAIL(0x80004005). I have looked for help on this error...
1
by: 1983.yadav | last post by:
Hi All, I m Pankaj, i ve a problem in accessing data from MS-Access Table. The error is System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005) My query to...
0
by: kuzen | last post by:
Hi Main.Cmd.CommandText = "SELECT ID, NAME FROM NAMES;" Main.DA.SelectCommand = Main.Cmd Main.DT = New DataTable Main.DA.Fill(Main.DT) ComboBox3.DataSource = Main.DT ComboBox3.ValueMember =...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.