Use a connection class like-
public SqlConnection dbConnect()
{
cnnStr = "Data Source = 10.168.2.32";
cnnStr += "; Initial Catalog = DBNAME";
cnnStr += "; Integrated Security = false";
cnnStr += "; User ID = userid";
cnnStr += "; Password = password";
return new SqlConnection(cnnStr);
}