I have a windows form application created using C#. I have a few databases and tables in SQL server 2005 express edition. To create a setup of my project I wish to attach the databases and tables dynamically while my setup wizard runs on any remote machine.
I tried to write a code which will simply create database and also a try-catch statement which will check if the database exists but everytime execution of try catch statement whenever my application runs may be a problem.
Is this possible by simply attaching the .mdf files with my project as I create the setup wizard ?
Please help. Thanks in advance.