Partager via


CDataSource : : OpenWithPromptFileName

This method prompts the user with a dialog box, then opens a data source using the file specified by the user.

HRESULT OpenWithPromptFileName( 
   HWND hWnd = GetActiveWindow( 
   ), 
   DBPROMPTOPTIONS dwPromptOptions = DBPROMPTOPTIONS_NONE, 
   LPCOLESTR szInitialDirectory = NULL  
) throw( );

Paramètres

  • hWnd
    [in] Handle to the window that is to be the parent of the dialog box.

  • dwPromptOptions
    [in] Determines the style of locator dialog box to display. See Msdasc.h for possible values.

  • szInitialDirectory
    [in] The initial directory to display in the locator dialog box.

Valeur de retour

A standard HRESULT.

Notes

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.

Configuration requise

En-tête : atldbcli.h

Voir aussi

Référence

classe de CDataSource