Common declarations in connection strings include DataSource, Server, and Addr. DataBase declaration InitialCatalog and DataBase. Integrated Windows Account Security statements such as IntegratedSecurity and Trusted_Connection. Use the security statement UserID and Password of the database account. For
Common declarations in connection strings include Server declarations such as Data Source, Server, and Addr. DataBase declaration Initial Catalog and DataBase. Integrated Windows Account Security statements, such as Integrated Security and Trusted_Connection. Use the Security Statement of the database account, such as User ID and Password. For
Commonly used declarations in connection strings include:
The Server declares Data Source, Server, and Addr.
DataBase declaration Initial Catalog and DataBase.
Integrated Windows Account Security statements, such as Integrated Security and Trusted_Connection.
Use the Security Statement of the database account, such as User ID and Password.
For the account accessing the database, we usually see the string connection of ADO. NET in some references as follows:
String ConnStr = "server = localhost;
User id = sa; password = xxx; database = northwind ";
For an account integrated with Windows security, the connection string is generally written as follows:
String ConnStr = "server = localhost;
Integrated security = sspi; database = northwind ";
Or string ConnStr = "server = localhost;
Trusted_connection = yes; database = northwind ";
Using Windows integrated security verification has many advantages in accessing the database: higher security, faster access, less security architecture re-design, hard-coded connection strings, etc, it is worth using.