Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

Scheduled Pinned Locked Moved ASP.NET
debuggingdatabasegraphicssysadmindata-structures
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    busteronline
    wrote on last edited by
    #1

    I get the following error while trying to access an msacccess database ,i cant seem to figure it out,the error is IErrorInfo.GetDescription failed with E_FAIL(0x80004005). 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: IErrorInfo.GetDescription failed with E_FAIL(0x80004005). Source Error: Line 20: SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position" Line 21: DBCommand = New OleDbCommand(SQLString, DBConnection) Line 22: DBReader = DBCommand.ExecuteReader() Line 23: Line 24: While DBReader.Read() the source code that generate d error is as follows <%@ Page Language="vb" Debug="true" %> <%@ Import Namespace="System.Data.OleDb" %> <%@ Import Namespace="System.Drawing" %> Sub Page_Load Dim DBConnection As OleDbConnection Dim DBCommand As OleDbCommand Dim DBReader As OleDbDataReader Dim SQLString As String Dim Counter As Integer = 0 DBConnection = New OleDbConnection( _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("miraflash.mdb")) DBConnection.Open() SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position" DBCommand = New OleDbCommand(SQLString, DBConnection) DBReader = DBCommand.ExecuteReader() While DBReader.Read() Dim MyButton as New Button MyButton.Text = DBReader("position") MyButton.CommandName = DBReader("position") MyButton.Width = Unit.Parse("100px") MyButton.Font.Size = FontUnit.Parse("8pt") AddHandler MyButton.Command, AddressOf Get_Books ButtonArea.Controls.Add(MyButton) Dim MyBlank As New Literal MyBlank.Text = "  " ButtonArea.Controls.Add(MyBlank) Counter += 1 If Counter Mod 3 = 0 Then Dim MyBreak As New Literal MyBreak.Text = "<br/>" ButtonArea.Controls.Add(MyBreak) End If End While DBReader.Close() DBConnection.Close() End Sub Sub Get_Books (Src as Object, Args As CommandEventArgs) Dim SQLString As String SQLString = "SELECT ID, Surname, Firstname, middlename FROM applicant " & _ "WHERE position = '" & Args.CommandName & "' " & _ "ORDER BY ID" BookSource.SelectCommand = SQLString End Sub

    J 1 Reply Last reply
    0
    • B busteronline

      I get the following error while trying to access an msacccess database ,i cant seem to figure it out,the error is IErrorInfo.GetDescription failed with E_FAIL(0x80004005). 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: IErrorInfo.GetDescription failed with E_FAIL(0x80004005). Source Error: Line 20: SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position" Line 21: DBCommand = New OleDbCommand(SQLString, DBConnection) Line 22: DBReader = DBCommand.ExecuteReader() Line 23: Line 24: While DBReader.Read() the source code that generate d error is as follows <%@ Page Language="vb" Debug="true" %> <%@ Import Namespace="System.Data.OleDb" %> <%@ Import Namespace="System.Drawing" %> Sub Page_Load Dim DBConnection As OleDbConnection Dim DBCommand As OleDbCommand Dim DBReader As OleDbDataReader Dim SQLString As String Dim Counter As Integer = 0 DBConnection = New OleDbConnection( _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("miraflash.mdb")) DBConnection.Open() SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position" DBCommand = New OleDbCommand(SQLString, DBConnection) DBReader = DBCommand.ExecuteReader() While DBReader.Read() Dim MyButton as New Button MyButton.Text = DBReader("position") MyButton.CommandName = DBReader("position") MyButton.Width = Unit.Parse("100px") MyButton.Font.Size = FontUnit.Parse("8pt") AddHandler MyButton.Command, AddressOf Get_Books ButtonArea.Controls.Add(MyButton) Dim MyBlank As New Literal MyBlank.Text = "  " ButtonArea.Controls.Add(MyBlank) Counter += 1 If Counter Mod 3 = 0 Then Dim MyBreak As New Literal MyBreak.Text = "<br/>" ButtonArea.Controls.Add(MyBreak) End If End While DBReader.Close() DBConnection.Close() End Sub Sub Get_Books (Src as Object, Args As CommandEventArgs) Dim SQLString As String SQLString = "SELECT ID, Surname, Firstname, middlename FROM applicant " & _ "WHERE position = '" & Args.CommandName & "' " & _ "ORDER BY ID" BookSource.SelectCommand = SQLString End Sub

      J Offline
      J Offline
      Jay Royall
      wrote on last edited by
      #2

      I read somewhere else that this error could be caused by using reserved words in your query. Try adding square brackets around your table and field names: e.g. SELECT DISTINCT [Position] FROM [applicant] ORDER BY [position]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups