locked
Sql Error -> --------------------------- Inventory Management Program --------------------------- Error occured. Error message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found o RRS feed

  • Question

  • ---------------------------
    Inventory Management Program
    ---------------------------
    Error occured.
    Error message: 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)
    ---------------------------
    OK   
    ---------------------------
    Saturday, February 27, 2016 9:49 AM

Answers

  • Hi manu jose k,

    Could you please provide more detailed information about this error? When do you get this error and which version of LightSwitch are you using?

    According to the error message, please check the connection string in Web.config which should be shown as below code.

    <connectionStrings>
        <add name="_IntrinsicData" connectionString="Data Source=|SqlExpressInstanceName|;AttachDbFilename=|ApplicationDatabasePath|;Integrated Security=True;Connect Timeout=30;MultipleActiveResultSets=True" />
      </connectionStrings>

    If you are using SQL Server Express which installed standalone, please make sure current Windows user has enough permission to connect and access to the SQL Server.

    Then please refer to below thread which has the similar problem. Hope it can help you.

    http://stackoverflow.com/questions/16904911/lightswitch-establishing-a-connection-to-sql-server-instance

    In addition, if possible, please share some code snippet or a sample project to help us reproduce this problem in our side.


    Best Regards,
    Weiwei

    • Marked as answer by Angie Xu Sunday, March 6, 2016 1:35 PM
    Tuesday, March 1, 2016 8:53 AM
    Moderator