把SQL数据库链接字符串写在web.config文件中,便于后期的修改及维护。
<connectionStrings> <add name="connStr" connectionString="server=hanbaohong\sqlexpress; database=test; uid=sa; pwd=sa123456"/> </connectionStrings>
配置SQL连接字符串
本文介绍如何将SQL数据库的连接字符串配置在web.config文件中,以便于后期进行修改和维护。示例展示了具体的XML配置格式。
把SQL数据库链接字符串写在web.config文件中,便于后期的修改及维护。
<connectionStrings> <add name="connStr" connectionString="server=hanbaohong\sqlexpress; database=test; uid=sa; pwd=sa123456"/> </connectionStrings>
429

被折叠的 条评论
为什么被折叠?