如何在asp.net字符串连接中添加用户标识和密码 [英] How do I add userid and password in asp.net string connection
本文介绍了如何在asp.net字符串连接中添加用户标识和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
sql数据库
用户名:rbc
密码:rbc123
数据源= abc;初始目录= testdatabase;集成安全性=真
sql database
username :rbc
password:rbc123
"Data Source=abc;Initial Catalog=testdatabase;Integrated Security=True"
推荐答案
Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=myPassword;
此处有更多信息: http: //www.connectionstrings.com/sql-server/ [ ^ ]
做一些研究,你可以在网上找到很多解决方案
Do some research and you can find plenty of solutions on web
<connectionStrings>
<add name="myConnectionString" connectionString="Data Source=abc;Initial Catalog=testdatabase; User Id=rbc; Password=rbc123; providerName="System.Data.SqlClient"/>
</connectionStrings>
http://www.sql-server-helper.com/sql-server-2008/sqlconnection-connection-string.aspx [ ^ ]
这篇关于如何在asp.net字符串连接中添加用户标识和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文