I made an application with animations in WPF with Visual Studio 2008 Team System and SQL Server 2005.
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.
My connection string is:
con.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=\"|DataDirectory|safedb.mdf\";Integrated Security=True;Connect Timeout=30;User Instance=True";
What do you think? I must install Visual Studio in every computer?
What is the problem?
this is the code of that button which has error in another computer that doesn't have Visual Studio :
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();
yes I knew but i thought we need this program only when we want to make databases not using it ...
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 ???
so what ?
and please give me the link of sql server express edition only for using with my app ...
it means i must place that besides of my app ???
Thanks A Lot Again My Sweet Friend :X