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.