這裏是我的連接字符串連接到SQL Server 2000 ...如何從.NET 4
Data Source=MYMACHINE\SERVER2000; Initial Catalog=MyDatabase; User Id=sa; Password=p;
這裏的錯誤....
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
我可以用企業管理器正常連接。此外,我已將SQL Server升級到Serivce Pack 4.
任何想法可能是什麼問題?
嘗試使用舊式連接字符串:在您的情況下,它會是類似這個:'server = MYMACHINE \ SERVER2000;數據庫= MyDatabase的; UID = SA; pwd = p;' –