| title |
CDataSource Class | Microsoft Docs |
| ms.custom |
|
| ms.date |
11/04/2016 |
| ms.reviewer |
|
| ms.suite |
|
| ms.technology |
|
| ms.tgt_pltfrm |
|
| ms.topic |
article |
| f1_keywords |
ATL.CDataSource |
ATL::CDataSource |
CDataSource |
|
| dev_langs |
|
| helpviewer_keywords |
|
| ms.assetid |
99bf862c-9d5c-4117-9501-aa0e2672085c |
| caps.latest.revision |
12 |
| author |
mikeblome |
| ms.author |
mblome |
| manager |
ghogen |
| translation.priority.ht |
cs-cz |
de-de |
es-es |
fr-fr |
it-it |
ja-jp |
ko-kr |
pl-pl |
pt-br |
ru-ru |
tr-tr |
zh-cn |
zh-tw |
|
Corresponds to an OLE DB data source object, which represents a connection through a provider to a data source.
|
|
| Close |
Closes the connection. |
| GetInitializationString |
Retrieves the initialization string of the data source that is currently open. |
| GetProperties |
Gets the values of properties currently set for the connected data source. |
| GetProperty |
Gets the value of a single property currently set for the connected data source. |
| Open |
Creates a connection to a provider (data source) using either a CLSID, ProgID, or a CEnumerator moniker provided by the caller. |
| OpenFromFileName |
Opens a data source from a file specified by the user-supplied file name. |
| OpenFromInitializationString |
Opens the data source specified by an initialization string. |
| OpenWithPromptFileName |
Allows the user to select a previously created data link file to open the corresponding data source. |
| OpenWithServiceComponents |
Opens a data source object using the Data Link dialog box. |
Remarks
One or more database sessions can be created for a single connection. These sessions are represented by CSession. You must call CDataSource::Open to open the connection before creating a session with CSession::Open.
For an example of how to use CDataSource, see the CatDB sample.
Header: atldbcli.h
OLE DB Consumer Templates
OLE DB Consumer Templates Reference