string [email protected]"server= (local) \sqlexpress;database=adventureworks;integrated Security=sspi";
The integrated SECURITY=SSPI Security Support Provider interface in is a common API that defines a comprehensive food to validate,
Integrated security services such as Microsoft Information Integrity, information privacy, and security services for all distributed application protocols. The designer of the application protocol can take advantage of this interface to obtain different security services without having to modify the protocol itself.
-----------------------------------
Integrated Secuity identity authentication method
When False, a user ID and password are specified in the connection.
When True, the current Windows account credentials are used for authentication.
The recognized values are true,fales, yes, no, and SSPI, which is equivalent to true.
----------------------------
If you use the security authentication mechanism that comes with Windows, you can open the database without adding UID and password
If you do not write integrated SECURITY=SSPI, you must connect the string to write uid=sa;password=00;
Otherwise, you can't open the database.