I am using SQL Server Express with my app (Windows app C#). I am trying to insert a new row. after run sucessfuly When I show table no thing added to table but new row added to grid view
Code:
string connectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
SqlConnection con = new SqlConnection(connectionString);
string sql = " ";
con.Open();
sql = "INSERT INTO errors (machine_id, machine_name, groub, error_type, degree, description, date) VALUES ('2', '2', '2', '2', '2', '2', '1/2/1998')";
SqlCommand cmd = new SqlCommand(sql, con);
cmd.ExecuteNonQuery();
con.Close();