I had solve the DbConcurrency problem by using Try and catch , and compare
the Original & Currenct Record.
For the single table, I can use the above approcah sucesfully.
However, for one-to-many relationship,. I don't know how to do it.
For, example, Invoice (Two tables involved, invoice_info & Invoice_chg) ,
If two users amend one item's description in Invoice , I don't know how to
check the sub-item.
**I only know how to pass one table with one primary key to check the
DBconcurrency
_daBase.Fill(_dsBase_ver, _dtTable)
Dim _col() As DataColumn =
{_dsBase_ver.Tables(_dtTable).Columns(_colname)}
_dsBase_ver.Tables(_dtTable).PrimaryKey = _col
rowInDB = _dsBase_ver.Tables(_dtTable).Rows.Find(_searchkey)
' Loop through the column values.
Dim i As Integer
Dim strData_o, strData_c As String
For i = 0 To dbcx.Row.ItemArray.Length - 1
strData_o = dbcx.Row(i, DataRowVersion.Original).ToString
strData_c = rowInDB(i, DataRowVersion.Current).ToString
If strData_o <> strData_c Then
strOriginal &= dbcx.Row(i, DataRowVersion.Original) &
ControlChars.Tab
strCurrent &= rowInDB(i, DataRowVersion.Current) &
ControlChars.Tab
strYour &= dbcx.Row(i, DataRowVersion.Current) &
ControlChars.Tab
End If
Next