您的位置:首页 > 博客中心 > 数据库 >

[转]SQL Server 连接串关键字别名

时间:2022-03-14 02:28

-----------------------------------------------

In .Net, there is a class called that is very useful for dealing with SQL Server connection strings using type-safe properties to build up parts of the string. This class keeps an internal list of synonyms so it can map from one value to another:

+----------------------+-------------------------+
| Value                | Synonym                 |
+----------------------+-------------------------+
| app                  | application name        |
| async                | asynchronous processing |
| extended properties  | attachdbfilename        |
| initial file name    | attachdbfilename        |
| connection timeout   | connect timeout         |
| timeout              | connect timeout         |
| language             | current language        |
| addr                 | data source             |
| address              | data source             |
| network address      | data source             |
| server               | data source             |
| database             | initial catalog         |
| trusted_connection   | integrated security     |
| connection lifetime  | load balance timeout    |
| net                  | network library         |
| network              | network library         |
| pwd                  | password                |
| persistsecurityinfo  | persist security info   |
| uid                  | user id                 |
| user                 | user id                 |
| wsid                 | workstation id          |
+----------------------+-------------------------+

(Compiled with help from Reflector)

There are other similar classes for dealing with and connection strings, but unfortunately nothing for other database vendors - I would assume the onus is on a vendor‘s library to provide such an implementation.

热门排行

今日推荐

热门手游