connection error with SQL
I am working in vwd using C#. In my web develpent I am Connecting to the Sql server 2000's pubs table and displaying result in GridView Control.
My Coding is
SqlConnection con = new SqlConnection("Server=local host;uid=sa;pwd=kumar;database=pubs");
string str = "select * from authors";
SqlDataAdapter da = new SqlDataAdapter(str, con);
DataSet ds = new DataSet();
GridView1.DataSource = ds;
This is a very simple Code.
Now I got a error which is
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)
Can you tell me what is the problem here