K
KaOne
Hi All,
excuse me in advance for my not very perfect english. I need some help about
a problem with a FormView bounded to an ObjectDataSource. In practise I have
an ObjectDataSource that uses some BLL methods that implements the
optimistic concurrency by a TimeStamp field into the DB. So, when I execute
an insert, update or delete query if I receive 0 like return value from that
queries I understand that a concurrency problem is occurs so I will inform
the user.
The problem comes because, when I'm able to know that a concurrency error is
occurs is too late, because the only event of the FormView in wich I can
cancel the databind (by the Cancel property of the FormViewupdateEventArgs
object) is the ItemUpdating event that, unfortunatelly, occurs BEFORE the
Updated Event of the ObjectDataSource in wich I can check the concurrency
error. So, when a concurrency error occurs I can inform the user but I can't
avoid to reset the FormView with the new value stored into the DB, losting
all the new values entered by the user.
How can I solve this problem? Is there a method to cancel the automatic bind
on the FormView and force id only when I want?
Thanks a lot.
excuse me in advance for my not very perfect english. I need some help about
a problem with a FormView bounded to an ObjectDataSource. In practise I have
an ObjectDataSource that uses some BLL methods that implements the
optimistic concurrency by a TimeStamp field into the DB. So, when I execute
an insert, update or delete query if I receive 0 like return value from that
queries I understand that a concurrency problem is occurs so I will inform
the user.
The problem comes because, when I'm able to know that a concurrency error is
occurs is too late, because the only event of the FormView in wich I can
cancel the databind (by the Cancel property of the FormViewupdateEventArgs
object) is the ItemUpdating event that, unfortunatelly, occurs BEFORE the
Updated Event of the ObjectDataSource in wich I can check the concurrency
error. So, when a concurrency error occurs I can inform the user but I can't
avoid to reset the FormView with the new value stored into the DB, losting
all the new values entered by the user.
How can I solve this problem? Is there a method to cancel the automatic bind
on the FormView and force id only when I want?
Thanks a lot.