473,811 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IErrorInfo.GetD escription failed with E_FAIL(0x800040 05)

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 OleDbDataAdapte r. It works as a stored procedure but not
as a query from the program.

IErrorInfo.GetD escription failed with E_FAIL(0x800040 05)

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("sD BConnection")
Dim sSQL As String = "SELECT tblWeek.Week, tblVocabulary.W ord,
tblVocabulary.P ronunciation, 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.W eek "
sSQL += "ORDER BY tblWeek.Week, tblVocabulary.W ordID;"
dbConn.InnerTex t = sConnection
query.InnerText = sSQL

Dim objDataSet as new DataSet()

Try

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

objCommand.Conn ection = objConnect
objCommand.Comm andType = CommandType.Tex t
objCommand.Comm andText = sSQL

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

End Try

dgrOutput.DataS ource = objDataSet.Tabl es
dgrOutput.DataB ind()

End Sub

</script>

Dec 27 '05 #1
0 1742

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

Similar topics

0
1692
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 System.Runtime.InteropServices.COMException (0x80004005): The client
0
2696
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 => "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)." QUERY: " SELECT "+ " (select Quantity from Items_Detail idt "+
1
2039
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 function that I am using in a lot of other places successfully. This is the one that fails on "da.Fill(dt)"... Public Function GetDataTable(ByVal strSql As String, ByVal strCnnString As String) As DataTable Dim cnn As New...
1
10470
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 cause. Can someone please help? **************************************** Dim SelectQuery As String = "SELECT ExchangeID, Surname, GivenName, Initials FROM Global-List" Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data...
5
38953
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 following problems when configuring the DataAdapter Details: Genereated Select Statement
0
1200
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;'" Dim sheetName As String Dim excelConnect As New OleDbConnection(connectString) excelConnect.Open()
0
2128
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 appreciated. I have attached my code below, ________________________________________________________ OleDbConnection ConExcl = new OleDbConnection(); string sConExcl = string.Empty;
0
1483
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 on the web, and every site I found said it is caused by using a keyword as a fieldname in my database. However, I have checked and am pretty sure that none of my fieldnames are keywords.
1
4781
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 fetch the data is - Qry="select ZONE,CIRCLE,DIVISION,LOCATION,LOCATIONDESCRIPTION,LOCATIONCODE from ML" and my connection string is-
0
1542
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 = Main.DT.Columns.Item(0).ToString ComboBox3.DisplayMember = Main.DT.Columns.Item(1).ToString
0
9727
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10398
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10133
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6889
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
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 we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.