Quote:
but all the results seem to be focussed on connections through code (connection strings) rather than through SQL.
Can I assume that
CDatabase::ExecuteSQL
is the MFC class? If so then before attempting to execute the SQL statement through that class you must have performed an
Open
. One of the parameters to the
Open
statement is
lpszConnectQuote:
Specifies a connection string. The connection string concatenates information, possibly including a data source name, a user ID valid on the data source, a user authentication string (password, if the data source requires one), and other information. The whole connection string must be prefixed by the string "ODBC;" (uppercase or lowercase). The "ODBC;" string is used to indicate that the connection is to an ODBC data source; this is for upward compatibility when future versions of the class library might support non-ODBC data sources.
It is that connection string that is incorrect - possibly targeting an earlier version of Office.