日期:2014-05-17  浏览次数:21075 次

C# SQL Server2000
C#   怎样连接   SQL   Server2000?谢谢

------解决方案--------------------
SqlConnection conn=new SqlConnection(连接字符串);
------解决方案--------------------
一般在web.config中设置:
<add key= "connstring " value= "Data Source=(local);user id=sa;pwd=123;Initial Catalog=guestbook;Integrated Security=False "/>

读取的时候:
string connsql= ConfigurationSettings.AppSettings[ "connstring "];