a few note (too long for a comment)
to test:
before the update
1: select the row by id - check it exists
2: check the values against the new values to see if they actually need to change
during the update:
int rowsAffected = p_komut.ExecuteNonQuery();
if rowsAffected > 0 then something was affected. Zero would mean that no rows where found
after the update
select the row again and perform the previous "before the update" steps.
Other notes:
you don't need to ever say
if(x == true)
. it's redundant. if(x) will do so the line in your if should read
if(chb_icmaldurumu.Checked)
You don't need tp pass through param1, param2 etc. you can use a param type:
public void P_BesParametre(string komut, param KeyValuePair[] parametreVeDeger){
OleCommand p_kamut = new OleDbCommand(komut, p_baglanti);
foreach(var pvd in parametreVeDeger){
p_komut.Parameters.AddWithValue(pvd.Key, pvd.Value);
}
try{
p_baglanti.Open();
p_komut.ExecuteNonQuery
p_baglanti.Close();
}catch{}
}
usage:
P_BesParametre(komut, new KeyValuePair{Key="@p1",Value="value"},new KeyValuePair{Key="@p2",Value="value"},new KeyValuePair{Key="@p3",Value="value"});
or
List<keyvaluepair> kvps = new ...
kvps.Add(new KeyValuePair{Key="@p1",Value="value"});
kvps.Add(new KeyValuePair{Key="@p2",Value="value"});
kvps.Add(new KeyValuePair{Key="@p3",Value="value"});
P_BesParametre(komut, kvps.ToArray())</keyvaluepair>