Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Concurrency Error with Computed columns
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.
Thanks,
Jeff
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement