-1

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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • [How to deploy application with sql server database on clients](https://stackoverflow.com/a/32956485/3110834) – Reza Aghaei Feb 17 '22 at 19:46
  • 1
    And by the way, SSMS is SQL Server Management Studio, which is not the database engine. – Reza Aghaei Feb 17 '22 at 19:47
  • SQL Server LocalDB is very lightweight and has a silent installed if you want. Do not hard-code the connection string, put it into a settings file – Charlieface Feb 17 '22 at 21:15

1 Answers1

0

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.

Nate
  • 61
  • 13