What is causing my OLEDbException, IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

后端 未结 3 1958
心在旅途
心在旅途 2020-12-06 10:53

I am using an OleDbConnection, OldDbCommand, and OleDbReader against an Access database.

I have a named query in the database which I am calling from the code.

3条回答
  •  执念已碎
    2020-12-06 11:39

    Another possible cause of this exception is if the File your trying to load/read does not exist.

    I have found it useful to perform a "File.Exists" before trying to open the file just to make sure my code detects this specific cause of the "IErrorInfo.GetDescription failed with E_FAIL" exception correctly.

提交回复
热议问题