I have a number of SqlDataSource objects in my application, which don't have Optimistic Concurrency option enabled. The SDS objects use custom Sql statements so I can no longer select the Advance button to enable Concurrent Concurrency.
How can I enable this option? Is there a designt ime property, and even a run time property that can be set?
The only method we have so far is to create a new SDS, with Optimistic Concurrency switched on, then copy and paste my custom Sql into it and rebind my components..
Any help on this matter is appreciated.
Regards,
Steven
SqlDataSource class dose not have corresponding member for this options, you can check the SqlDataSource element of the SqlDataSource control in which you do not choose customize statement: it seems this option acts like the ConflictDetection property. Here is a section from VS2005 documentation:
Use optimistic concurrency
This element sets how the SqlDataSource control handles conflicts when updating or deleting data. When Use optimistic concurrency is selected, the ConflictDetection property is set to the value CompareAllValues. When Use optimistic concurrency is not selected, the ConflictDetection property is set to the value OverwriteChanges, which is the default value.
Thanks for the reply.
I have checked this property, hoping I could somehow enable this feature but it appears not.
This member is only useful if Optimistic Concurrency has already been set through the design settings.
It seems strange that the option can be set freely in design mode, but the developer has no option to turn this setting back on IF custom Sql has been used on the SDS.
No comments:
Post a Comment