ODBC Driver Configuration Dialog
Hi
I am calling :
CDatabase::OpenEx to configure an ODBC connection, from a MFC based Dialog, and when I choose a MySql driver (3.51.15) the connection configuration Dialog goes behind my dialog?
when I select Access or any other driver all is OK, and my dialog is behind the driver dialog.
I tried SQLConfigDataSource with the HWND of my Dialog and I have the same behaviour.
Environment: vs 2005, MFC, winXP.
Thank you
Re: ODBC Driver Configuration Dialog
Add CDatabase::noOdbcDialog option to the dwOptions parameter in OpenEx call.
Re: ODBC Driver Configuration Dialog
thank you for your reply
but I want to display the dialog to configure the datasource, but I want the dialog to be on the front of my application Dialog?
Re: ODBC Driver Configuration Dialog
Sorry for my inattention! :blush:
Re: ODBC Driver Configuration Dialog
Add CDatabase::forceOdbcDialog option to the dwOptions parameter in OpenEx call.
Re: ODBC Driver Configuration Dialog
May be I was not very clear in my first post.
my call is the following:
CDatabase db;
db.OpenEx(sConnectionString,CDatabase::openReadOnly | CDatabase::forceOdbcDialog);
The ODBC Driver Dialog is Displayed, but its behind the calling dialog (mine), and this just when the driver is Mysql. for other drivers all is OK.
So I tried :
SQLConfigDataSource(pDlg->GetSafeHwnd(),ODBC_ADD_DSN,sDriver,"");
And I have the same behaviour, the MySql ODBC Driver is behind my main window.
thank you.