• ConnectionString


    The following table lists the valid names for keyword values within the ConnectionString.

    NameDefaultDescription
    Application Name The name of the application, or '.Net SqlClient Data Provider' if no application name is provided.
    AttachDBFilename

    -or-

    extended properties

    -or-

    Initial File Name

     The name of the primary file, including the full path name, of an attachable database.

    The database name must be specified with the keyword 'database'.

    Connect Timeout

    -or-

    Connection Timeout

    15The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.
    Current Language The SQL Server Language record name.
    Data Source

    -or-

    Server

    -or-

    Address

    -or-

    Addr

    -or-

    Network Address

     The name or network address of the instance of SQL Server to which to connect.
    Encrypt'false'When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Recognized values are true, false, yes, and no.
    Initial Catalog

    -or-

    Database

     The name of the database.
    Integrated Security

    -or-

    Trusted_Connection

    'false'When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication.

    Recognized values are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true.

    Network Library

    -or-

    Net

    'dbmssocn'The network library used to establish a connection to an instance of SQL Server. Supported values include dbnmpntw (Named Pipes), dbmsrpcn (Multiprotocol), dbmsadsn (Apple Talk), dbmsgnet (VIA), dbmslpcn (Shared Memory) and dbmsspxn (IPX/SPX), and dbmssocn (TCP/IP).

    The corresponding network DLL must be installed on the system to which you connect. If you do not specify a network and you use a local server (for example, "." or "(local)"), shared memory is used.

    Packet Size8192Size in bytes of the network packets used to communicate with an instance of SQL Server.
    Password

    -or-

    Pwd

     The password for the SQL Server account logging on (Not recommended. To maintain a high level of security, it is strongly recommended that you use the Integrated Security or Trusted_Connection keyword instead.).
    Persist Security Info'false'When set to false or no (strongly recommended), security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. Resetting the connection string resets all connection string values including the password. Recognized values are true, false, yes, and no.
    User ID The SQL Server login account (Not recommended. To maintain a high level of security, it is strongly recommended that you use the Integrated Security or Trusted_Connection keyword instead.).
    Workstation IDthe local computer nameThe name of the workstation connecting to SQL Server.


    from :http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28VS.71%29.aspx

  • 相关阅读:
    JQ库函数记忆要点
    PHP运算符:算数运算符、逻辑运算符、三目运算符、位运算符、字符串运算符。
    ThinkPHP函数详解:F方法(快速缓存方法)
    AndroidStudio项目提交(更新)到github最详细步骤
    git项目管理及fatal: remote origin already exists.解决方法
    git项目管理及fatal: remote origin already exists.解决方法
    git分支(存在意义和使用方法)
    RecyclerView
    Git Windows版本
    chmod 777 -R on existing path getting chmod: -R: No such ...
  • 原文地址:https://www.cnblogs.com/no7dw/p/1710248.html
Copyright © 2020-2023  润新知