473,382 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

DbConcurrency - Design Problem

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
Nov 21 '05 #1
0 927

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Omer van Kloeten | last post by:
The Top Level Design: The class Base is a factory class with a twist. It uses the Assembly/Type classes to extract all types that inherit from it and add them to the list of types that inherit...
0
by: Ellis Yu | last post by:
Dear all, I've got a problem when I delete a newly created record. My case is I use commandBuilder to automatically generate insert, delete, update command. It all goes fine on these. But the...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
3
by: Chris Thunell | last post by:
I am trying to delete all the records in a table, but I keep getting a system.data.dbconcurrency exception. Is there an easy was to delete all the records in a sql table? Here is my code... i...
22
by: Krivenok Dmitry | last post by:
Hello All! I am trying to implement my own Design Patterns Library. I have read the following documentation about Observer Pattern: 1) Design Patterns by GoF Classic description of Observer....
1
by: Nogusta123 | last post by:
Hi, I have had a lot of problems getting web pages, master pages and content pages to render in VS2005 design view the same as they would in Internet Explorer. I did a lot of looking on the...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
17
by: roN | last post by:
Hi, I'm creating a Website with divs and i do have some troubles, to make it looking the same way in Firefox and IE (tested with IE7). I checked it with the e3c validator and it says: " This...
9
by: AceKnocks | last post by:
I am working on a framework design problem in which I have to design a C++ based framework capable of solving three puzzles for now but actually it should work with a general puzzle of any kind and I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.