I'm getting the following error when trying to view an aspx web page.
"SQL Server does not exist or access denied"
The aspx page and sql database are located on the same machine.
Here is my connection string and code:
string SQL = "SELECT * FROM tblCountry"; SqlConnection conn = new SqlConnection("Data Source=(localhost);Initial Catalog=YLCdbSQL;Integrated Security=SSPI"); SqlCommand countryLoad = new SqlCommand (SQL, conn); SqlDataAdapter daCountry = new SqlDataAdapter(countryLoad); DataSet dsCountry = new DataSet("YLCdbSQL"); try { conn.Open(); daCountry.Fill(dsCountry, "countryName"); } finally { conn.Close(); } |
The error highlights the conn.Open(); line. I'm using SQL Server 2000.
Any ideas what the problem might be
Thanks

SQL Server does not exist or access denied
Kjartan_Thor
Goto Tools/Internet Options, select connections Tab and click on Lan Settings Button. There you will get the Proxy settings. Check whether your Proxy Settings are correct.
Vetric
That's solved that one!
However, now when i try to to view the page in internet explorer the status bar reads "Detecting Proxy Settings . . ." and gets no further.
I presume this has something to do with recently upgrading my internet connection since setting up SQL server.
Any ideas on how to resolve it
Thanks
Odd
SqlConnection conn = new SqlConnection("Server=(localhost);Database=YLCdbSQL;Integrated Security=SSPI");