最近在学习ado.net, 用的书是ado.net in a nutshell, 书中采用的例子是MSDE,奇怪的是用localhost不行,改成机器名字就可以了(win2000 pro)。
string connectionString = "Data Source=localhost;" +
"Initial Catalog=Northwind;Integrated Security=SSPI";
SqlConnection con = new SqlConnection(connectionString);
nutshell这本书很好!
另外,安装MSDE的时候注意:
setup SAPWD="AStrongSAPwd"
其中,AStrongSAPwd 是为 sa 登录指定的强密码