在CSDN看了看,问VS2005+SQL2005的不少,可没有
VS2005+SQL2000的,今日试了下,连接本地SQL2000没问题,
一连到远程(局域网)SQL2000,呵呵,出问题了!报错: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"不知道应该对SQL2000做什么设置才能避免该问题.因为用VS2003+远程SQL2000,同样的代码就可行.