By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,713 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,713 IT Pros & Developers. It's quick & easy.

DbConcurrency - Design Problem

P: n/a
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
_daBase.Fill(_dsBase_ver, _dtTable)
Dim _col() As DataColumn =
_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) &
strCurrent &= rowInDB(i, DataRowVersion.Current) &
strYour &= dbcx.Row(i, DataRowVersion.Current) &
End If
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.