سلام به همگی
من برای اولین باره که میخوام با پایگاه داده کار کنم. در اولین قدم خواستم یه اتصال با پایگاه برقرار کنم که نشد!
این کدم هستش
SqlConnection newconnect = new SqlConnection("Server=localhost;Database=Pubs;User =" + "IntegratedSecurity=True;");
newconnect.Open();
newconnect.Close();
که این خطا رو میده:
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)
ممنون میشم کمکم کنید