I have a DataSet
I have been working with in an application that I have been building and modifying largely through the designer interface. I have had zero problems since the last change I made, and the application still runs and accesses / modifies the data in the DataSet
with no problems.
Unfortunately, now when I try and make any sort of change through the designer, a message box is shown with the following message:
Configure TableAdapter ExcelView failed. Unable to find connection 'EsNotesConnectionString' for object 'Settings'. The connection string could not be found in the application settings, or the data provider associated with the connection string could not be loaded.
Looking at the xsd generated by the designer, the Settings
object and associated EsNotesConnectionString
property seem to be pointed correctly by the following xsd element.
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ESNotesConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="ESNotesConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ESNotes.Editor.Dataset.Properties.Settings.GlobalReference.Default.ESNotesConnectionString" Provider="System.Data.SqlClient" />
I could not find an xsd element that points Settings
or its connection property to a different location.
The connection string is located (and correct) in the Properties.Settings of the appropriate project as seen below:
The connection is successful when testing the connection through the Properties.Settings interface for connection strings, and the same user account can successfully access the database through other interfaces. Has anyone else had this problem? Why can't the DataSet
designer find the connection string? I can in fact edit the DataSet
by editing the code and xsd itself, but this is a huge pain compared to using the designer interface.
The solution ended up being embarrassingly simple. I was able to once again make edits in the designer by changing the Connection
property of the appropriate TableAdapter
(or stored procedure) to (None)
, then back to its original connection. Note that this had to be done for each table or stored procedure I wished to make changes to through the designer. Don't ask me why this was necessary, but it fixed my problem.