Hi Rob,
<<When I try to open a CDatabase object using the method Open(DatabaseName) I
am prompted with the "SQL Data Sources" dialog box. I have checked the
odbc.ini file and I have an entry for my database. Is there some way of
turning off this dialog?>>
The syntax you gave:
Open(DatabaseName)
is not correct for the CDatabase::Open member function. You need to pass as
the first parameter "DSN=<data-source>". See the documentation for
CDatabase::Open and the section "Data Source:Managing Connections" in the
Database Classes manual for more information.
Also, you should use the ODBC Administrator of the Windows Control Panel to
check and see what data sources you have set up, instead of looking at
odbc.ini.
Steve Roeder
Microsoft Developers Support