'How to deploy WinForms application with SQL Server database on client machine

I have few things to clear.

  1. Connection String:

    SqlConnection con = new SqlConnection("Data Source=DESKTOP-JDMJQRT;Initial Catalog=IEC_SMS;Integrated Security=True");
    

    This is my current connection string. What changes should I make so that it'll also work on client machine?

  2. What should be the prerequisite? (It is a WinForms application written in C# and SQL Server as database)

  3. Do I need to install SSMS on client machine as well?

  4. How to create setup.exe file?



Solution 1:[1]

Installing SQL Server automatically is no easy feat with a setup. You would really want to look at something like InstallAware (I have used it for over 10 years to do exactly what you are asking).

You do NOT need SSMS to communicate with the database from your WinForms app.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nate