I am using the following lines of code to update records based on rowid:
here dsmain the dataset that i am using….
For j = 2 To AuditGrid.Rows – 1
If AuditGrid.ActiveCell.Row = j And AuditGrid.ActiveCell.Col = ColMark Then
Uvalue = Trim(AuditGrid.Cell(j, ColMark).Text)
da.UpdateCommand = New OracleCommand("update audit01 set user" & Trim(User) & "='" & Trim(Uvalue) & "' where audit01.rowid='" & Trim(AuditGrid.Cell(j, ColWRowid).Text) & "'")
End If
Next
da.Fill(DsMain, "AUDIT01")
da.Update(DsMain, "AUDIT01")
DsMain.AcceptChanges()
the problem is that the database is not being updated. what to do?
i have used the following lines of code and it now works perfectly fine…
If AuditGrid.ActiveCell.Row > 0 Then