PDA

View Full Version : خطا بعد از حذف یک رکورد



mina.manesh
دوشنبه 17 تیر 1392, 17:32 عصر
يك تابع درست كردم با با عنوان RowsToRemove
Dim RowstoRemove() As DataRow = DsTelephon.Koboz.Select("koboz_id =" & DataGridView1.CurrentRow.Cells(3).Value)
If RowstoRemove Is Nothing AndAlso RowstoRemove.Length > 0 Then
For I As Integer = 0 To RowstoRemove.Length - 1
RowstoRemove(I).Delete()
Next
DsTelephon.AcceptChanges()
End If
DataGridView1.Rows.RemoveAt(DataGridView1.CurrentR ow.Index.ToString)
اما وقتی می خواهم یک رکورد را اضافه کنم هنوز همان خطا را میدهد
Concurrency violation: the DeleteCommand affected 0 of the expected 1 records
مگر اینکه فرم را ببندم وبعد یک رکورد اضافه کنم که در این صورت خطا نمی دهد

swallow.pa
دوشنبه 17 تیر 1392, 20:24 عصر
دوست گرامي چرا مطالب رو بريده بريده تو سايت مي فرستي بايد همون تايپك قبلي رو ادامه بدي