I created an application in C#, .Net 4.0.
In this application i need to show a DataConnectionDialog
for accessing DataBase.
I use this code :
DataConnectionDialog BDdialog = new DataConnectionDialog();
DataSource.AddStandardDataSources(BDdialog);
BDdialog.SelectedDataSource = DataSource.OdbcDataSource;
BDdialog.SelectedDataProvider = DataProvider.OdbcDataProvider;
DataConnectionDialog.Show(BDdialog);
On my laptop, the code works fine, but on another laptop, with .Net 4.0 and .Net 4.5 there is an Exception when I try to open this dialog :
Nevertheless, I added these DLL in the same directory of my exe :
Microsoft.Data.ConnectionUI.Dialog.dll
Microsoft.Data.ConnectionUI.Dialog.resources.dll
Microsoft.Data.ConnectionUI.dll
Anyone could help me? How correcting this error please?
You get these libraries files from Nuget source.