Heim > Datenbank > MySQL-Tutorial > Hauptteil

web.config中connectionStrings数据库连接字符串介绍

WBOY
Freigeben: 2016-06-07 15:30:18
Original
1756 Leute haben es durchsucht

web.config中connectionStrings中 connectionString 各属性字段的介绍 Application Name 应用程序的名称,如果不提供应用程序名称,默认为“.Net SqlClient Data Provider”。 AttachDBFilename / extended properties / Initial File Name : 可连接数据库的

 

web.config中connectionStrings中connectionString各属性字段的介绍

 

Application Name

应用程序的名称,如果不提供应用程序名称,默认为“.Net SqlClient Data Provider”。

 

AttachDBFilename / extended properties / Initial File Name:

可连接数据库的主文件的名称,包括完整的路径名, 必须使用关键字“database”来指定数据库的名称。

 

Connect Timeout / Connection Timeout:

在终止尝试连接并产生错误之前,等待与服务器的连接的时间长度(以秒为单位),默认为15。

 

Data Source / Server / Address / Addr / Network Address:

要连接的 SQL Server 实例的名称或网络地址。

 

Initial Catalog / Database:

数据库的名称。

 

Integrated Security / Trusted_Connection

当为 false 时,将在连接中指定用户 ID 和密码。当为 true 时,将使用当前的 Windows 帐户凭据进行身份验证。 可识别的值为 true、false、yes、no 以及与 true 等效的 SSPI(强烈推荐)。

 

Packet Size

用来与 SQL Server 的实例进行通讯的网络数据包的大小,以字节为单位,默认为8192。

 

Password / Pwd

SQL Server 帐户登录的密码(建议不要使用。为了维护最高级别的安全性,强烈建议改用 Integrated Security 或 Trusted_Connection 关键字)。

 

Persist Security Info

当该值设置为 false 或 no(强烈推荐)时,如果连接是打开的或者一直处于打开状态,那么安全敏感信息(如密码)将不会作为连接的一部分返回。重置连接字符串将重置包括密码在内的所有连接字符串值。可识别的值为 true、false、yes 和 no,默认为false。

 

User ID

SQL Server 登录帐户(建议不要使用。为了维护最高级别的安全性,强烈建议改用 Integrated Security 或 Trusted_Connection 关键字)。

 

Max Pool Size

池中允许的最大连接数。

 

Min Pool Size

池中允许的最小连接数。

 

Pooling

当该值为 true 时,系统将从相应池中提取 SQLConnection 对象,或在必要时创建该对象并将其添加到相应池中。可识别的值为 true、false、yes 和 no,默认值为true。

 

 

参考资料:     connectionStrings数据库连接字符串的介绍     http://www.studyofnet.com/news/223.html

 

 

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!