Error 26 - error locating Server/Instance specified.

  • Hi there. I've built a windows forms app using vs.net 2005, along with a sql database via sql server express 2005.

    I need to move this application & data to another computer. So far, I've done the following:

    1. Used the installation wizard in VS.NET to create a package for :

    - .NET framework 2.0

    - sql server express 2005

    - other app depencies.

    - application itself.

    2. I've successfully installed all the components above. Also manually installed SQL Server Express management Studio on the target machine.

    3. loaded up all my existing data onto the target machine by restoring a backup from the source machine.

    4. edited my configuration file so that it reflects the new server name.

    When i start my app and then try to request to see the data, i get the error that i've listed above in the title of the post. The error message also suggests that i should check to ensure that remote connections are enabled on my database, which i've done. I've also started the "SQL Server Browser" service.

    But i'm still getting the same error message.

    My connection string looks like:

    <add name='TerritoryManager.My.MySettings.territorEConnectionString"

    connectionString="Data Source=YOUR-16EFCDA\SQLEXPRESS;Initial Catalog=territorE;Integrated Security=True" providername="System.Data.SqlClient" />

    The bolded part is the only thing i changed, as it's the new machine name.

    I have no problems viewing the database via SQL Server Management Studio.

    Any suggestions would be appreciated.

    Thanks.

  • If you can view it in SSMS, the instance is started. In SSMS, however, are you registering/connecting to "YOUR-16EFCDA" or "YOUR-16EFCDA\SQLEXPRESS".

  • While in SSMS, on the left hand side, when i select my territorE database, the system displays the database name in bold print on the right hand side, and under the name, it has the following path:

    YOUR-16EFCDA\SQLEXPRESS\Databases\territorE

  • Resolved. I recompiled the application and replaced the source computer name with ".\SQLEXPRESS" ... eliminating the need to edit the config file

    the target machine is now working.

    Thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply