I receive the following errors when I attempt to connect to a SQL Server database on my home computer:
1) Keyword not supported: 'intigreted security'?
2) 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)
This is the code of ado.net that I want to connect with:
SqlConnection connection = new SqlConnection();
connection.ConnectionString = "Data Source=Local Host;Initial Catalog=AdventureWorks;";
SqlCommand cmd = new SqlCommand("Select * from emp_", connection);
SqlDataReader myReader = cmd.ExecuteReader();
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:email@example.com
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: