TypeInitializationException: A network-related or instance-specific error... [Error: 26]

TypeInitializationException: A network-related or instance-specific error... [Error: 26]

Issue:

You receive the following error when trying to login to Forecast 5.

Forecast 5 cannot continue because of an exception occurred.

SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified.



Cause:

This error indicates that Forecast 5 is unable to connect to the currently specified database or cannot see the SQL Server.

Solution:

If Forecast 5 cannot find SQL Server or database, there are a few causes:
this article from Microsoft gives you the full detail.

1. SQL server name in the config file is misspelled or incorrect.
      - Ensure you have entered the correct name.

2. The Instance name is incorrect or does not exist.
      - Ensure that the instance is correct and valid.

3. The server is not reachable.
      - Ensure that Named Pipes, TCP/IP and SQL Brower service have been enabled and are running. Best to restart the SQL Server in this case.
      - If this does not work, try Ping the server. If this fails, you need to look into the server set up.

4. The Firewall on the server is enabled.
      - This needs to be disabled.

 

If the SQL Server is not running, open the windows menu and search for Services/Local Services:

 

Scroll down until you find your SQL Server and make sure that its status is Running:


 

If it is showing as Stopped select your SQL server, right click on it and select Start.



    • Related Articles

    • SQLException: A network-related or instance-specific error... [Error: 52]

      Issue: Forecast 5 cannot continue because of an exception occured: SqlException Solution:   This error is generally caused because the Forecast 5 cannot find the SQL Server you are trying to connect to. Please check that your computer can see the SQL ...
    • GST/VAT Rate Error: TargetInvocationException

      Issue / Error Message: When opening a forecast, the following error occurs:   TargetInvocationException Exception has been thrown by the target of an invocation. NullReferenceException Object reference not set to an instance of an object.    at ...
    • TypeInitializationException: "System.Array.Empty" when opening Forecast 5

      Issue: After an upgrade, you are receiving the following error when opening Forecast 5: TypeInitializationException The type initializer for 'Forecast5.Model.Node' threw an exception. TargetInvocationException Exception has been thrown by the target ...
    • Exception: Cannot get computer id

      Issue: When trying to open Forecast 5, you get the following error: Exception Cannot get computer id Cause: Forecast 5 requires a computerid in order to license successfully. If the id cannot be read for any reason, the exception will occur. ...
    • Upgrading Forecast 5 when on a network/server

      When updating Forecast 5 to the latest version, users on a network or server must consider a few things: 1. No one must be using the program during the upgrade process. Only once the whole upgrade process has been completed should users re-enter the ...