close
 
本文將列出可供 OLE DB Provider for SQL Server 在隨附於 Visual Studio 6.0, 版版本 7.01.0502 初始化 (ActiveX Data Objects ] [ ADO 連線) 屬性。 Visual Studio 文件列出了 SQLOLEDB Provider, 初始設定屬性時部份的屬性描述不正確, 且文件未指定其他資訊如描述名稱的屬性。

其他相關資訊

名稱的屬性 (Property) 是重要讓您瞭解如何使用 ADO 連接字串中的, 來設定屬性 (Property。

會 SQLOLEDB 將 OLE DB 初始設定和授權屬性解釋為:
   ADO Connection string name/PropertyID      Description
   --------------------------------------     -----------------------------

   "Data Source"                              The SQL Server to connect to.
   DBPROP_INIT_DATASOURCE

   "Initial Catalog"                          The SQL Server database.
   DBPROP_INIT_CATALOG

   "Integrated Security"                      A string containing the name
   DBPROP_AUTH_INTEGRATED                     of the authentication
                                              service. The default value
                                              for this is VT_EMPTY.
                                              This can be set to "SSPI" or
                                              to a null BSTR pointer for
                                              Windows NT Integrated
                                              security (Secured
                                              Support Provider Interface).
                                              If SQL security is desired,
                                              the "Password" and "User ID"
                                              properties should be set
                                              instead.


   "Locale Identifier"                        SQLOLEDB validates the locale
   DBPROP_INIT_LCID                           ID and returns an error if
                                              the locale ID is not
                                              supported or is not installed
                                              on the client computer.

   "Password"                                 The password assigned to a
   DBPROP_AUTH_PASSWORD                       SQL Server login. This
                                              property is used when SQL
                                              Server Authentication Mode
                                              is selected for authorizing
                                              access to a SQL Server
                                              database.

   "Persist Security Info"                    SQLOLEDB persists
   DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO     authentication values,
                                              including an image of a
                                              password, if requested to do
                                              so. No encryption is
                                              provided.

   "Prompt"                                   SQLOLEDB supports all
   DBPROP_INIT_PROMPT                         prompting modes for data
                                              source initialization.
                                              SQLOLEDB uses
                                              DBPROMPT_NOPROMPT
                                              as its default
                                              setting for the property.

                                              DBPROMPT_PROMPT (1)
                                              Always prompt the user for
                                              intialization information.

                                              DBPROMPT_COMPLETE (2)
                                              Prompt the user only if more
                                              information is needed.

                                              DBPROMPT_COMPLETEREQUIRED (3)
                                              Prompt the user only if more
                                              information is needed.  Do
                                              not allow the user to enter
                                              optional information.

                                              DBPROMPT_NOPROMPT (4)
                                              Do not prompt the user.

   "User ID"                                  A SQL Server login. This
   DBPROP_AUTH_USERID                         property is used when SQL
                                              Server Authentication
                                              Mode is selected for
                                              authorizing access to a SQL
                                              Server database.

   "Window Handle"                            A window handle from the
   DBPROP_INIT_HWND                           calling application. A valid
                                              window handle is required for
                                              the initialization dialog box
                                              displayed when prompting for
                                              initialization properties is
                                              allowed.

   "Connect Timeout"                          SQLOLEDB returns an error on
    DBPROP_INIT_TIMEOUT                       initialization if a
                                              connection to the SQL Server
                                              cannot be established within
                                              the number of seconds
                                              specified. Approximately ten
                                              seconds is the lower limit.
				
下列屬性是擴充由 SQLOLEDB 提供者定義的屬性。 所有的屬性都是讀取 / 寫入。 屬性 ID 定義於 Sqloledb.h 檔案。 請參閱 〈 參考 〉 一節如需如何取得標頭檔 (Header File) 的資訊。
   ADO Connection String Name/PropertyID   Description
   -------------------------------------   ------------------------------

   "Application Name"                      The client application name.
   SSPROP_INIT_APPNAME
   Type: VT_BSTR

   "Auto Translate"                        VARIANT_TRUE
   SSPROP_INIT_AUTOTRANSLATE               SQLOLEDB performs OEM/ANSI
   Type: VT_BOOL                           character conversion when
                                           multi-byte character strings
                                           are retrieved from, or sent
                                           to the SQL Server.

                                           VARIANT_FALSE
                                           SQLOLEDB does not perform
                                           OEM/ANSI character conversion
                                           on multi-byte character string
                                           data.

   "Current Languge"                       A SQL Server language name.
   NOTE: Note the incorrect                Identifies the language used
         spelling.                         for system message selection
   SSPROP_INIT_CURRENTLANGUAGE             and formatting.  The language
   Type: VT_BSTR                           must be installed on the SQL
                                           Server or data source
                                           initialization fails.

   "Network Address"                       The network address of the SQL
   SSPROP_INIT_NETWORKADDRESS              Server specified by the
   Type: VT_BSTR                           DBPROP_INIT_DATASOURCE
                                           property.

   "Network Library"                       The name of the Net-Library
   SSPROP_INIT_NETWORKLIBRARY              (DLL) used to communicate with
   Type: VT_BSTR                           the SQL Server. The name should
                                           not include the path or the
                                           .dll file name extension. The
                                           default is provided by the SQL
                                           Server client configuration.

   "Packet Size"                           A network packet size in bytes.
   SSPROP_INIT_PACKETSIZE                  The packet size property value
   Type: VT_I4                             must be between 512 and 32767.
                                           The default SQLOLEDB network
                                           packet size is 4096.

   "Use Procedure for Prepare"             SQL Server stored procedure
    SSPROP_INIT_USEPROCFORPREP             use. Defines the use of SQL
    Type: VT_I4                            Server temporary stored
                                           procedures to support the
                                           ICommandPrepare interface.

                                           SSPROPVAL_USEPROCFORPREP_OFF (0)
                                           A temporary stored procedure is
                                           not created when a command is
                                           prepared.

                                           SSPROPVAL_USEPROCFORPREP_ON (1)
                                           Default
                                           A temporary stored procedure is
                                           created when a command is
                                           prepared. The temporary stored
                                           procedures are dropped when the
                                           session is released.

                                      SSPROPVAL_ USEPROCFORPREP_ON_DROP (2)
                                           A temporary stored procedure is
                                           created when a command is
                                           prepared. The procedure is
                                           dropped when the command is
                                           unprepared with
                                           ICommandPrepare::Unprepare, or
                                           when a new command is specified
                                           for the command object with
                                           ICommandText::SetCommandText, or
                                           when all application references
                                           to the command are released.

   "Workstation ID"                        A string identifying the
   SSPROP_INIT_WSID                        workstation.
   Type: VT_BSTR

   "Initial File Name"                     This property is for future use
   SSPROP_INIT_FILENAME                    with SQL Server 7.0 database
   Type: VT_BSTR                           files.
				
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 hsiung03 的頭像
    hsiung03

    hsiung.博格 ERP軟體

    hsiung03 發表在 痞客邦 留言(0) 人氣()