golhay2
دوشنبه 17 مرداد 1390, 16:47 عصر
با سلام من از کد زیر برای آپدیت استفاده می کنم ولی ارور می ده و می گه که چند تا از فیلدها مقدار ندارند در حالی که همه فیلدها مقدار دارند لطفا راهنمائی کنید
DataBase db = new DataBase();
long i;
i = Int32.Parse(txtparvanehno.Text);
db.DoCommand("update vakil set [comment]='" + txtcomment.Text + "',[sabeghe]='" + txtsabeghe.Text + "',[tel]='" + txttel.Text + "',[address]='" + txtaddress.Text + "',[work]='" + txtwork.Text + "',[father]='" + txtfather.Text + "',[nickname]='" + txtshohrat.Text + "',[family]='" + txtfamily + "',[name]='" + txtname.Text + "',[id]=5 where parvanehno = i");
Form_kala_Load(sender, e);
MessageBox.Show("ویرایش با موفقیت انجام شد");
DataBase db = new DataBase();
long i;
i = Int32.Parse(txtparvanehno.Text);
db.DoCommand("update vakil set [comment]='" + txtcomment.Text + "',[sabeghe]='" + txtsabeghe.Text + "',[tel]='" + txttel.Text + "',[address]='" + txtaddress.Text + "',[work]='" + txtwork.Text + "',[father]='" + txtfather.Text + "',[nickname]='" + txtshohrat.Text + "',[family]='" + txtfamily + "',[name]='" + txtname.Text + "',[id]=5 where parvanehno = i");
Form_kala_Load(sender, e);
MessageBox.Show("ویرایش با موفقیت انجام شد");