Select Data Source pops up
-
Hi, I am new to DB programming. I get a dialog during the execution of programming when using Database "Select Data Source" dialog. I had already created a CDatabase object and initialized the DSN name, user name password in the OpenEx() call of it. When I try to use the CRecordSet object to access the database, this dialog box pop up. I cross checked the ODBC DSN name and it is set right. why this dialog box pops up in between.. Can someone help me out on this. thanks,
-
Hi, I am new to DB programming. I get a dialog during the execution of programming when using Database "Select Data Source" dialog. I had already created a CDatabase object and initialized the DSN name, user name password in the OpenEx() call of it. When I try to use the CRecordSet object to access the database, this dialog box pop up. I cross checked the ODBC DSN name and it is set right. why this dialog box pops up in between.. Can someone help me out on this. thanks,
What do your call(s) to
CDatabase::OpenEx()
andCRecordset::Open()
look like?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi, I am new to DB programming. I get a dialog during the execution of programming when using Database "Select Data Source" dialog. I had already created a CDatabase object and initialized the DSN name, user name password in the OpenEx() call of it. When I try to use the CRecordSet object to access the database, this dialog box pop up. I cross checked the ODBC DSN name and it is set right. why this dialog box pops up in between.. Can someone help me out on this. thanks,
Try opening the database using CDatabase::OpenEx and specifying the CDatabase::noOdbcDialog flag. I have a feeling it's going to fail since the dialog is popping up because you haven't passed enough info in your connection string. The flag will prevent the dialog from popping up though! :) Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder