I created a set up file and attached the database using SQL Server Express 2008, but when I run the app, I get this error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server cannot be found or cannot be accessed.
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 the specified server / instance)
I think it's the data source - is there anyway I can make my data source flexible?
Here is my data source :
SqlConnection cnx = new SqlConnection(@"Data Source=.\OSSAMA;Initial Catalog=assurance_stage;Persist Security Info=True;User ID=sa;Password=2041925");