Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 1.54 KB

access-to-odbc-and-sql.md

File metadata and controls

18 lines (13 loc) · 1.54 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Access to ODBC and SQL
Access to ODBC and SQL
11/04/2016
API calls [C++], calling DAO or ODBC directly
Windows API [C++], calling from MFC
ODBC API functions [C++]
ODBC API functions [C++], calling from MFC
SQL [C++], calling ODBC API functions
ODBC [C++], API functions
5613d7dc-00b7-4646-99ae-1116c05c52b4

Access to ODBC and SQL

The Microsoft Foundation Class Library encapsulates many Windows API calls and still lets you call any Windows API function directly. The database classes give you the same flexibility with regard to the ODBC API. While the database classes shield you from much of the complexity of ODBC, you can call ODBC API functions directly from anywhere in your program.

Similarly, the database classes shield you from having to work much with SQL, but you can use SQL directly if you want. You can customize recordset objects by passing a custom SQL statement (or setting portions of the default statement) when you open the recordset. You can also make SQL calls directly using the ExecuteSQL member function of class CDatabase.

For more information, see ODBC: Calling ODBC API Functions Directly and SQL: Making Direct SQL Calls (ODBC).

See also

ODBC and MFC