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:
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
Post a Comment