Freigeben über


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 Windows SDK.

Return Value

A standard HRESULT.

Remarks

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 https://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbole_db_services.asp?frame=true.

Requirements

Header: atldbcli.h

See Also

Reference

CDataSource Class

Other Resources

CDataSource Members