locked
Error Loading Data RRS feed

  • Question

  • User-666910606 posted

    Hi i am in need of help in regards to error loading data, the following codes is in the Main.aspx.cs >>>

    public void LoadData()
    {
    SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM PublicEvent Inner Join UserTable ON PublicEvent.mlogin = UserTable.mlogin Order By publicEDcreated desc",
    "server=19-36\\localhost;database=mpsip;Integrated Security=SSPI");
    DataTable table = new DataTable();
    adapter.Fill(table);
    Repeater1.DataSource = table;
    Repeater1.DataBind();

    }

    when running this page i get the following error hope u can help with suggessions on how to solve >>>

    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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Source Error:

    Line 30:        "server=19-36\\localhost;database=mpsip;Integrated Security=SSPI");
    Line 31:        DataTable table = new DataTable();
    Line 32: adapter.Fill(table); Line 33:         Repeater1.DataSource = table;
    Line 34:         Repeater1.DataBind();


    Source File: c:\Users\1B13155\Desktop\MP Project (Previous)\MPSIP\Main.aspx.cs    Line: 32             

    Sunday, July 7, 2013 11:58 PM

Answers

  • User1786028798 posted

    Hi,

    I think SQL server down or the specified connection string is wrong.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 8, 2013 12:05 AM

All replies