I'm trying to create a working installer or setup file for an application I created using C# in VS 2010.
I used InstallShield and also the built-in one and they do created the setup files and I installed the app with no problem.
But when I ran the program, this thing pops up:
My database connections:
On the forms:
SqlConnection cn = new SqlConnection(@"SERVER=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;DATABASE=Database;Integrated Security=True;User Instance=True");
App.Config
:
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"
What could be wrong? Should my connection string on the form the same as the one in the app.config
file?
- Visual Studio 2010 Ultimate
- SQL Server 2008 Express