I have finished my inventory control system project built with C# and it contains a database. I created the database manually by just using server explorer as following.. (I'm very new to C# and Visual Studio)
So, the database is stored as files (SQL file for each table). Currently they're in Documents folder.
And this is the connection string
conString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\tharindulucky\Documents\LoginSys.mdf;Integrated Security=True;Connect Timeout=30";
So it's like hard coded.
So, the thing is now I want to create the SetUp Wizard with InstallShield which automatically installs my application along with the database files.
So, how to do it ?
How to include this database files with my program and how to make the connection string dynamic ? Which matches with the path of the user's computer ?
I'm very new to C# and Visual Studio. So, a simple explanation would be reallly appreciated. Thanks!