Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Concurrency Error with Computed columns
Message
 
À
02/01/2008 17:06:55
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01279115
Message ID:
01279576
Vues:
14
Jeff,

>I have a table with a computed column. I have the table bound to a grid which does not include the computed column. When I add a new row, everything is fine. If I modify the new row after saving the data, I get a Concurrency error when it attempts to save. I fired up the SQL Profiler and the computed field is being sent through as part of the WHERE clause for the UPDATE statement. It's clear that the reason it fails is because I don't have the correct value for the computed field.
>
>Is there a way to prevent the computed field from being sent in the UPDATE statement? Set a property in the field or something?
>
>Is there a way to avoid this problem other than retrieving data every time I save? If not, how would I retrieve just the data I changed rather than the whole dataset?
>
>I am now spoiled and would like to continue to use the data binding.

You can set the business object's UpdateSelectCommand to exclude the calculated column. The data layer looks at this property (it's passed from the business object to the data access class) to determine how to create the Update command.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform