I have used SQL SERVER 2005 & c# .net for front end & app.config file also used .
But, when i have install the exe in those system in that no Visual Studio but framework 3.5 is present then error shows & on the other hand exe install & run quite well in those system in that already installed the VS & framework .
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[
"gdesigner.Properties.Settings.Database1ConnectionString"].ConnectionString);
con.Open();
SqlCommand cmd =
new SqlCommand("insert into abc values('"+textBox1.Text+"')",con);
cmd.ExecuteNonQuery();
MessageBox.Show("DATA INSERTED");
app.config:
<connectionStrings>
<add name="gdesigner.Properties.Settings.Database1ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Difficult to understand without a precise error message, but I bet the error is
that on machine without Visual Studio none has installed SQLServer Express.