473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

I'm working through this Wrox book chapter about .Net data access. I'm
using an Access Database and I keep getting this error when using the
OleDbCommand and OleDbDataAdapter. It works as a stored procedure but not
as a query from the program.

IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

I got the query right from the Query View of Access.

I googled this error and it seems to be pretty common but I still can't find
a reply with an answer.

Here is the code...
<body>

<span id='dbConn' runat="server"></span><br /><br />
<span id='query' runat="server"></span><br /><br /><br />
<span id="outError" runat="server"></span><br /><br /><br />
<asp:datagrid id="dgrOutput" runat="server"></asp:datagrid>

<script language="VB" runat="server">

Sub Page_Load()

Dim sConnection As String = Application("sDBConnection")
Dim sSQL As String = "SELECT tblWeek.Week, tblVocabulary.Word,
tblVocabulary.Pronunciation, tblDefinitions.Usage, tblDefinitions.Definition
"
sSQL += "FROM tblWeek INNER JOIN (tblVocabulary INNER JOIN
tblDefinitions ON (tblVocabulary.WordID = tblDefinitions.WordID) AND
(tblVocabulary.WordID = tblDefinitions.WordID)) ON tblWeek.Week =
tblVocabulary.Week "
sSQL += "ORDER BY tblWeek.Week, tblVocabulary.WordID;"
dbConn.InnerText = sConnection
query.InnerText = sSQL

Dim objDataSet as new DataSet()

Try

Dim objConnect As New OleDbConnection(sConnection)
Dim objCommand As New OleDbCommand

objCommand.Connection = objConnect
objCommand.CommandType = CommandType.Text
objCommand.CommandText = sSQL

Dim objDataAdapter As New OleDbDataAdapter()
objDataAdapter.SelectCommand = objCommand
objDataAdapter.Fill(objDataSet, "Defs")
Catch objError As Exception
outError.innerHTML = "<b>* Error while accesing data</b>.<br />" _
& objError.Message & "<br />" & objError.Source
Exit Sub ' and stop execution

End Try

dgrOutput.DataSource = objDataSet.Tables
dgrOutput.DataBind()

End Sub

</script>

Dec 27 '05 #1
0 1707

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CTDev Team | last post by:
Hi, We are using Exchange Server 5.5, and have applications written in VB6 and C# that read and process emails. We are experiencing intermittent errors similar to C# Application ...
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: Anish G | last post by:
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...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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,...

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.