Connecting to a Data Source

HomeOverviewHow Do IFAQSampleTutorialODBC Driver List

An ODBC data source is a specific set of data, the information required to access that data, and the location of the data source, which can be described using a data-source name. From your program’s point of view, the data source includes the data, the DBMS, the network (if any), and ODBC.

To access data provided by a data source, your program must first establish a connection to the data source. All data access is managed through that connection.

Data-source connections are encapsulated by class CDatabase. Once a CDatabase object is connected to a data source, you can:

When you finish working with a data-source connection, you close the CDatabase object and either destroy it or reuse it for a new connection. For more information about data-source connections, see the article Data Source (ODBC).