RE: GridView RowEditing Requery question



Hello Matt,

Regarding on the Row Index issue in GridView databinding/updating you
mentioned, I think it is a common case if the DataSource you used to bind
Gridview is always retrieved from database directly(is this your case)?

Actually, for ASP.NET web page, due to the http protocol's stateless
nature, when a page first display to client with databound data, and after
the user submit page to do editing/updating, there may exists some certain
timespan, and there certainly may have occured changed in the backend
database, if it is a frequently updating database.

Therefore, for your scenario, if your backend database may frequently be
changed due to the front application's concurrent access(multi-users
environment),I suggest you consider the following approach:

** Implement local cache in your ASP.NET application(for the data access
component). Whenever you pull some resultset from database, you cached it
in server momey(such as using the ASP.NET application cache) so that before
the cache become invalid, the calling side always get the cached resultset.

** For your GridView(or any other front databound controls), instead of
directly query backend database, you use the local cached dataset (during
the lifecycle of the cached resultset). This can confirm the consistency of
the datasource be bound to GridView(between multiple databinding or page
requests roundtrip).

How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.








.



Relevant Pages

  • Re: GridView RowEditing Requery question
    ... Gridview is always retrieved from database directly? ... ** Implement local cache in your ASP.NET application(for the data access ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: query-based update failed
    ... Could you please clarify a bit more on what you mean by "checking each record in your recordset to see if it is in your database table at that time"? ... Look forward to your response. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.odbc)
  • Re: VS2008 DBE (GDR)
    ... target database, which already has data in some lookup tables. ... Microsoft Online Community Support ... nature are best handled working with a dedicated Microsoft Support Engineer ...
    (microsoft.public.vsnet.general)
  • Re: Search services not available
    ... If a content database is not associated with a search server and you ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: What so special about PostgreSQL and other RDBMS?
    ... That's exactly the link the licence agreement for the database points to when it ... comes to what wecan expect for paying support. ... > "Oracle may provide additional releases or versions of its programs ... If the requirements are volatile I'd do a long term contract detailing what ...
    (comp.lang.php)