473,569 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.aggregat eQty = sum(Child(linke dRelationship). 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.Ve rsionNotFoundEx ception'
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 2073

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

Similar topics

2
282
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 RootLevel.dll containing only this code: using System; namespace RootLevel { public class Root {
1
1690
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 rw.WriteConfigInfo("User Modes", chkInvisible.Text, chkInvisible.Checked, "PirateChat.xml") the error occured in hightleighted in below :....... Public Function...
3
1946
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
1300
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 rw.WriteConfigInfo("User Modes", chkInvisible.Text, chkInvisible.Checked, "PirateChat.xml") the error occured in hightleighted in below :....... Public Function...
10
1683
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 I doing something wrong? Try it for yourself in your Command Window in the .Net IDE. Type ?5.1 * 100 in the command window during debugging. ...
0
296
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 = 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...
5
3700
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 in MySQL 4.x) Particularly, I find GROUP_CONCAT practical to quickly display 1-many
0
2374
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 /// </summary> /// public class USDPCategoryObject {
5
2353
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 application - The web application deletes the row. I can see using the below that before and after the delete the string value is what it should be ...
0
7695
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5509
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.