Use the. NET data provider

Source: Internet
Author: User

1. a data provider is a set of classes for programmatic access to a data source.

When the database connection exceeds the scope, it will not be automatically closed. Therefore, you must manually close or release the connection after processing the connection.

 

Parameters of the connection string:

Applicationname: the name of the client application. If it is not specified, ". Net sqlclient dataprovider" is applied ".

Connecttimeout or connection Timeout: the connection timeout time (in seconds ).

Currentlanguage: The current SQL Server language.

Datasource/Server/address/ADDR/Network Address: name, alias, or network address of the SQL server instance.

Encrypt: whether to use SSL encryption technology between the client and the server. This will sacrifice a lot of performance costs and is rarely used.

Initialcatalog or database: name of the database to be connected.

Integratedsecurity or trusted connection: whether to use Windows certificate (true/Yes/sspi). The default connection string mode is false ).

Networklibrary: Specifies the transmission method used to connect to the database. Options include dbnmpntw (specified channel), dbmsrpcn (multiple protocols), dbmskocb (shared memory), dbmsspxn (IPX/SPX), and dbmssocn (TCP/IP ). If you use a server on the local host without specifying a database, the shared memory is used.

Password: user password.

Userid: User ID.

Workstationid: the name of the PC to which the server is connected.

Pooling: whether to collect SQL connections in the enterprise environment for better performance.

Minpool size: the minimum size of the connection pool.

Maxpool size: the maximum size of the connection pool.

Enlist: When this value is true, the connection automatically appears in the transaction of the current thread (if available ).

Connectionreset: whether to reset the connection status when it is removed from the connection pool. The default value is true.

Connectionlifetime: how long will the connection pool be retained. If it is set to 0 (default value), it has the maximum allowed timeout period.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.