Donate

Attach MSSQL DB To SQL Developer Edition On Runtime

If you have a program migrated to a pc where there is no sql express edition installed but a developer or enterprise edition is found and the database is part of the solution file.

If you run the program, a connection timeout error will occur. All you need to do is change the datasource name from .\sqlexpress to your Servername. Then change the credentials such as username and password.

Assuming you declare your connection string in app.config or web.config, here is an example:
  <add name="Southridge.Properties.Settings.SouthridgeConnectionString"  
        connectionString="Data Source=PC_SERVERNAME;  
        AttachDbFilename=|DataDirectory|\Southridge.mdf;user=sa;  
  password=yourpassword;  
        Connect Timeout=30;"  
        providerName="System.Data.SqlClient" />  

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.