Avatar of e_livesay
Flag for United States of America asked on

Why would the error "No error message available, result code: DB_SEC_E_AUTH_FAILED(0x80040E4D)" begin showing up in MSVS 2010?

I am writing regarding an error that has very recently (yesterday) appeared in the development environment of a piece of C# software that has been under development for nearly three years. The code is housed in a Subversion Repository and five developers total (including myself are working on it) using Microsoft Visual Studio 2010 (originally we used MSVS 2008).

The MSVS solution is a collection of 8 projects and a main form (call if frmX) which has a TabControl on it which coincidentally has 8 TabPages on it (i.e., there is not one TabPage per project).  To make the code more managable frmX is broken into a total of 9 files; the main file which has a Designer.cs file and 8 auxillary files, one for each TabPage.

Last night when I opened frmX from the MSVS Solution Explorer by double-clicking it, I received 9 identical error messages which appeared one after the other, all of which say:
No error message available, result code: DB_SEC_E_AUTH_FAILED(0x80040E4D).
I don't know that there are 9 because there are 9 frmX files but it seems related...

After clicking OK on these errors, the form opens in the MSVS Designer.  The code will clean successfully.  The code will build successfully.  The code will run.

Two of us have been chasing this problem today but cannot find any reason for why they are appearing.  Any thoughts on where these are coming from and how we can get rid of them?
.NET ProgrammingC#

Avatar of undefined
Last Comment

8/22/2022 - Mon
Jesse Houwing

Googleling the error message brings up errors related to the Connectionstring in your code or in the project file, config file or dataset.


Thanks for your reply.

I had seen some references on the web to this problem being related to a connection string issue but didn't see how it pertained to my problem since the errors appear in the development environment, prior to running the program.  However, I began deleting user-controls from main main form (i.e., frmX in my original posting) and the errors began disappearing.  In the constructor for those user controls a DB connection is initialized (i.e., a variable of type OleDBConnection is initialized).  Obviously deleting the user controls is not a long term solution but moving the initialization of the DB connection out of the constructor seems to be a possibility.

I guess that when the Visual Studio Designer shows frmX in the development environment it runs the constructor of the user-controls, tries to make the DB connection at that time and fails.

Deleting four user controls led to eight of the nine errors.  The relationship between the nine errors and the nine frmX files turned out to be coincidental afterall.
Jesse Houwing

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Thanks for your help.  The problem has been fixed.

Eight of the nine errors were dealt with by removing the DB connection code from the constructors of four user controls (UCs) - each UC was giving me two errors apiece.  Intead of moving that code into the Load event of the user-control and using the Design mode flag to determine whether or not the code should be performed, I created a new sub-routine named initialize_UC that is only called when the program is running from frmX (the main form).

The ninth error was due to a DB-related variable being declared in the declaration section of a fifth user-control.  However, this variable was unused and it was simply removed from the code.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes