Search code examples
sqlsql-serverstringconnectionaspxgridview

Connection String Help (Server 2003)


Can anyone please double check my connection string. I keep getting the error:

"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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) "


WEB CONFIG

<add name="MyDataConnectionString" connectionString="Data Source=MyWEB;Initial Catalog=MyData;Integrated Security=False"
  providerName="System.Data.SqlClient" />


ASPX FILE

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:MyDataConnectionString %>" 

        SelectCommand="SELECT JobNo, Desc, OpDate FROM MainDetails">
    </asp:SqlDataSource>

Solution

  • Integrated Security=false means you have to specify a valid SQL userid and password.