some time error through by commandBuilder,Concurrency violation: update command affected 0 of the expected 1 record,
although
dim row as datarow()=dataset.select("","",DataViewRowState.ModifiedCurrent)
if row.count>=1 then
{
call executeUpdateDateSet(busgerneral.ds,table,"select * from table")
busgerneral.ds.Tables(table).AcceptChanges()
Public Shared Function executeUpdateDataSet(ByVal dSet As DataSet, ByVal tblName As String, ByVal strSQL As String) As Integer
Dim DbAdapter As New SqlDataAdapter()
Dim DbCommand As New SqlCommand()
Try
If DbConn.State = 0 Then
createConn()
End If
DbCommand.Connection = DbConn
DbCommand.CommandText = strSQL
DbCommand.CommandType = CommandType.Text
DbAdapter.SelectCommand = DbCommand
Dim DbCommandBuilder As New SqlCommandBuilder(DbAdapter)
Return DbAdapter.Update(dSet, tblName)
}
i realy do not understand why command builder introduce me such error
}
i realy do not understand why command builder introduce me such error
}
i realy do not understand why command builder introduce me such error
}
i realy do not understand why command builder introduce me such error
DbCommandBuilder.ConflictOption = ConflictOption.OverwriteChanges