Use commandBuilder yr problem will be solved.
SqlCeDataAdapter da = new SqlCeDataAdapter("SELECT * FROM Name", con);
DataSet ds = new DataSet();
da.Fill(ds, "Name");
foreach (DataRow dr in ds.Tables["Name"].Rows)
{
Console.WriteLine(dr["FirsName"] + "\t" + dr["NickName"] + "\t" + dr["Address"] + "\t" + dr["Gender"]);
dr["Gender"]="Male";
}
SqlCommandBuilder sqlcmdBuild = new SqlCommandBuilder(da);
da.Update(ds.Tables["Name"]);
Console.Write("Press Enter to continue:");
Console.ReadLine();
Hope this will work