This example demonstrates how to show validation errors when IDataErrorInfo is used. For more information, refer to the corresponding help topic.
You can encounter the following exception:
A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)
This error is caused because the EntityFramework uses the missing LocalDB component.
To fix the issue, locate the App.config file within your application and open it. Change the defaultConnectionFactory in the following manner:
[XAML]<defaultConnectionFactorytype="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
Question Comments
Added By: Marc Esteve at: 10/15/2015 8:06:43 AM
I implement IDataErrorInfo and validation is performed correctly. However, error Icons are not displayed beside DevExpress editors within my Winforms user control.
Why?
Hi Marc,
To process your recent post more efficiently, I created a separate ticket on your behalf: T300893: Editors don't show validation errors from the IDataErrorInfo when located in a WinForms user control. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.