473,406 Members | 2,439 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,406 software developers and data experts.

Error calculating aggregate value over children with rowstate 'Add

I have an Expression based DataColumn that is defined to calculate the Qty
sum of all child rows, based on a self-referencing relationship (i.e.
Parent.aggregateQty = sum(Child(linkedRelationship).Qty) where both Parent
and Children are entries to the same DataTable.

I'm finding that if I create a new Child row and link it to a pre-existing
Parent, the next time I trigger an update event on that Parent row I get a
Error:

"An unhandled exception of type 'System.Data.VersionNotFoundException'
occurred.
Additional information: There is no Original data to access."

It appears that if the Parent rowState != 'Added', then it expects to find
an Original version value in each linked Child, throwing an exception when it
encounters the 'Added' child.

I can avoid the error by adding the child with a LoadDataRow command,
passing AcceptChanges = 'true', as this creates the row in an 'unmodified'
state. But this messes up the data update logic later on which relies on the
'added' state to call the correct stored procedure.

Any suggestions?
Jul 21 '05 #1
0 2058

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

Similar topics

2
by: Good Enchiladas | last post by:
While building on a class library for an VB.NET object model, I get something similar to the above error message, but not with C#. The steps to recreate the problem are as follows: 1. Build a...
1
by: Supra | last post by:
i got "system error" when saving to xml file. i am using checkbox1 control to xml. when user clicked checkbox and set to true and press btnOk to conform and save it to xml ...
3
by: koperenkogel | last post by:
Dear cpp-ians, I have a vector of structures: struct meta_group { float id; float num; float mean; float sum;
0
by: Supra | last post by:
i got "system error" when saving to xml file. i am using checkbox1 control to xml. when user clicked checkbox and set to true and press btnOk to conform and save it to xml ...
10
by: Chris Baxter | last post by:
In my program I am trying to do a simple calculation of 5.1 * 100 which should =510 if my gradeschool level math is correct. My problem is vb.net is returning 509.99999999999994 as the answer. Am...
0
by: TEbert | last post by:
I have an Expression based DataColumn that is defined to calculate the Qty sum of all child rows, based on a self-referencing relationship (i.e. Parent.aggregateQty =...
5
by: David Garamond | last post by:
What do people think of adding some more aggregate functions. These are the ones that MySQL has and PG doesn't: - STD/STDDEV - VARIANCE - BIT_OR - BIT_AND - GROUP_CONCAT (for strings, added...
0
by: abrosey | last post by:
The error is surrounded in stars near the bottom of the code, any help would be appreciated! namespace USDP.eCFUtilities { /// <summary> /// Summary description for CatalogHelper ///...
5
by: codefragment | last post by:
Hi I have a dataset which holds (amongest other things) a string. - The dataset gets loaded from the database via a middle tier - The string value contains "\r\n" - Its serialised to the web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.