This documentation is archived and is not being maintained.

CDataSource::OpenFromFileName 

Opens a data source from a file specified by the user-supplied file name.


HRESULT OpenFromFileName( 
   LPCOLESTR szFileName  
) throw( );

Parameters

szFileName

[in] The name of a file, usually a data source connection (.UDL) file.

For more information about data link files (.udl files), see Data Link API Overview in the Platform SDK.

A standard HRESULT.

This method opens a data source object using the service components in oledb32.dll; this DLL contains the implementation of Service Components features such as Resource Pooling, Automatic Transaction Enlistment, and so on. For more information, see "OLE DB Services" in the OLE DB Programmer's Reference at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbole_db_services.asp?frame=true.

Show: