다음을 통해 공유


CDataSource::OpenFromInitializationString

Opens a data source specified by the user-supplied initialization string.

HRESULT OpenFromInitializationString( 
   LPCOLESTR szInitializationString, 
   bool fPromptForInfo = false  
) throw( );

매개 변수

  • szInitializationString
    [in] The initialization string.

  • fPromptForInfo
    [in] If this argument is set to true, then OpenFromInitializationString will set the DBPROP_INIT_PROMPT property to DBPROMPT_COMPLETEREQUIRED, which specifies that the user be prompted only if more information is needed. This is useful for situations in which the initialization string specifies a database that requires a password, but the string does not contain the password. The user will be prompted for a password (or any other missing information) when trying to connect to the database.

    The default value is false, which specifies that the user never be prompted (sets DBPROP_INIT_PROMPT to DBPROMPT_NOPROMPT).

반환 값

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.

요구 사항

헤더: atldbcli.h

참고 항목

참조

CDataSource 클래스