A few days ago, some people raised the question about database lookup funcatoid setting data connection strings.
Default
Value of the first parameter condition
The second parameter connects to the string dbconnectionstring (ADO, oledb driver)
Third parameter data table (table name)
Fourth parameter condition field (field name)
It is equivalent to executing select * from table name where field name = Value
Dbconnectionstring is written in this parameter.
This brings about the following problems:
1. It is difficult to modify the configuration when the development environment and the database in the formal environment are inconsistent.
2. Security. The user/password is displayed in plain text.
The second problem is that it is recommended that you use Windows integrated authentication for MSSQL databases, and there is no way to handle ORACLE data.
For the first question, the best practice is to pass out-of-memory configuration questions. For example, I want to use btsntsvc.exe. config to add configuration information.
Then add a script functoid to the front, and use C #CodeRead configuration is passed in the second parameter. This method can solve this problem.
However, there is also a more convenient way to achieve this by using Microsoft to provide a common data connection file (. udl) to establish and test ADO connection properties.
For example:
File name = c: \ dbconnection. udl
How to create this udl file:
1. Create a new text file and rename it, for example, dbconnection. udl.
2. Double-click it and a wizard for configuring connection character escape will appear. Just click Next.
You can give it a try.