Share via


CDataSource::OpenFromFileName

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CDataSource::OpenFromFileName.

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

Syntax

  
      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/oledb/htm/oledbole_db_services.asp?frame=true.

Requirements

Header: atldbcli.h

See Also

CDataSource Class