How to create a combine setup of windows application and sql
i have completed with a windows application in which i am using sql database.
now i want to create a setup for this but i want when user instal my application Mssql will automatically install on user's system. how can i perform this.
i want my database should also get stored on that system.
Thanks
Aman Gandhi
comman sense is not so comman........
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Himanshu Bhensdadia8 reputationPosted Nov 23, 2011, 12:36 AM EST
You can add Sql Server Express Edition from that.
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Nov 26, 2011, 3:17 AM EST
Plz try Himanshu solution.
After the installation of setup, u want database should be automatically attach to sql.
for that u have to change ur connection string as follows:
Conn.ConnectionString = "Data source=ServerName';integrated security=true;AttachDBFilename=|DataDirectory|Databasename.mdf;User Instance=True"
Regards,
Pravin