I am trying to create setup file for my desktop application. I am using SQL Server Express as database and c# as programming language. I searched about creating the setup file but i am having some doubts... I have written the code to connect to the database in a class and called it wherever it is needed.
the code for creating connection is..
class dbConnection
{
SqlConnection con;
public SqlConnection doConnection()
{
try
{
String str = "Data Source=Basu-Pc\\SQL;Initial Catalog=PhoenixIS;Integrated Security=True;Pooling=False";
con = new SqlConnection(str);
con.Open();
}
catch (Exception exc)
{
MessageBox.Show(exc.Message);
}
return con;
}
}
I call this class where ever I need it....and now I have some questions:
- how do I modify the connection string in order to deploy it to other system?
- how do I deploy sql express along with the system with hassle?
please help me get answer to my questions...