I am creating a WPF application using C# and SQL Server. To create the set up file I am using advanced installer. The SQL Server is hosted on an online server (cloud cluster). I am connecting the server using this code:
private SqlConnection connect()
{
con = new SqlConnection();
con.ConnectionString = " Server=mssql-31772-0.cloudclusters.net,31772 ; Database=Project;User ID=sa ;Password=123 ;Trusted_Connection=true;Integrated Security=false";
return con;
}
And when I installed it on my computer that has SQL Server installed, it is working. But when I tried to use it on another computer that does not have SQL Server, it refuses to work.
Can someone tell me as to why that is happening? Do I need to add some file or something to get it to connect to online server?