title: Problem With WPF Application And SQL Server Database
body: <p>I made an application with animations in WPF with Visual Studio 2008 Team System and SQL Server 2005.</p>
  
  <p>So I have Windows XP and Windows 7, in Windows XP that I have Visual Studio and SQL Server and Framework 3.5 it works very well, but in Windows 7 and in other computers it can not connect to database, first I thought it's about Framework but in other computers I have this problem again.</p>
  
  <p>My connection string is:</p>
  
  <pre><code>con.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=\"|DataDirectory|safedb.mdf\";Integrated Security=True;Connect Timeout=30;User Instance=True";
  </code></pre>
  
  <p>What do you think?  I must install Visual Studio in every computer?</p>
  
  <p>What is the problem?</p>
  
  <hr>
  
  <p>this is the code of that button which has error in another computer that doesn't have Visual Studio :</p>
  
  <pre><code>            login l = new login();
          DataSet ds = new DataSet();
          SqlConnection con = new SqlConnection();
          con.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=\"|DataDirectory|safedb.mdf\";Integrated Security=True;Connect Timeout=30;User Instance=True";
          con.Open();
          String sql = "EXEC GetLoginModel";
          SqlDataAdapter da = new SqlDataAdapter(sql, con);
          da.Fill(ds);
          bool n = (bool)ds.Tables[0].Rows[0].ItemArray[0];
          bool s = (bool)ds.Tables[0].Rows[0].ItemArray[1];
          l.radioButton1.IsEnabled = n;
          l.radioButton2.IsEnabled = s;
          con.Close();
          this.Close();
          l.Show();
  </code></pre>
  
  <hr>
  
  <p>yes I knew but i thought we need this program only when we want to make databases not using it ...</p>
  
  <p>i saw a lot of softwares that they work with mssql but they are tiny and they don't need any other program to install ???</p>
  
  <p>so what ?</p>
  
  <p>and please give me the link of sql server express edition only for using with my app ...</p>
  
  <p>it means i must place that besides of my app ???</p>
  
  <p>Thanks A Lot Again My Sweet Friend :X  </p>