I have a form with an OleDbConnection object on it. This form fails to load in the Form Designer with the message:
One or more errors encountered while loading the designer.
The errors are listed below. Some errors can be fixed by rebuilding your project,
while others may require code changes.
Invalid authorization specification
at ADODB.ConnectionClass.Open(String ConnectionString, String UserID, String Password, Int32 Options)
... (stack trace continues into user code)
I've tracked this down to the OleDbConnection string. If I hardcode in the server IP, username/password/dbinstance into the constructor of the GUI form then the form will load in the designer. At run-time it is not an issue because we require the user to provide the login details.
The question:
Is it possible to use the OleDbConnection and the Form designer without supplying the database credentials in the source code of the form? For example, is there a property of the OleDbConnection or Form that I can set so that it doesn't need to access the database during Form design?
My concern is that if we ever move the database server or change the login that the code will stop working in the designer.