|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Application-wideI want to bind a series of ObjectDataSource instances to an application-wide business object which caches the results of a database
query. I'm confused about where/how to cache the results (it's a simple query, BTW, so I'm using a DataReader, not a DataTable). The business object has no knowledge of the application, and hence of the Cache, which is where I would normally put this kind of thing (actually, I used to put this stuff in global.asax.cs...but since MS in its infinite wisdom has radically redesigned ASP.NET 2, this is no longer an option). Suggestions? - Mark Hi Mark,
We have reviewed this issue and are currently researching on it. We will update you ASAP. Thanks for your patience! Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." Hi Mark,
Welcome. I've also followup in your former thread "ASP.NET 2.0: Global.asax Design Surface Gone", As I've mentioned, there what's the code raise the problem when you accessing ApplicationState? ApplicationState is absolute a application scope variable which is visible to all pages and requests..... Also, ASP.NET application Cache, Class's Static member are all possible approach for storing application scope data..... In addition, as for Caching the data retrieved from backend database, I don't quite recommend using DataReader because Datareader will hold a opened connection to the backend database until we call Close() to dispose the DataReader, see the below msdn remark: ========================= While the SqlDataReader is being used, the associated SqlConnection is busy serving the SqlDataReader, and no other operations can be performed on the SqlConnection other than closing it. This is the case until the Close method of the SqlDataReader is called. For example, you cannot retrieve output parameters until after you call Close ========================= So using a DataSet (typed or not) or a custom object class collection to hold such cached data is prefered.... Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | NNTP-Posting-Date: Fri, 23 Dec 2005 14:17:03 -0600 sv3-9BJVUyvbHIFaHGSfEY1hANOCWH0wWrX0lxFQn+j7zORB3cy1txUMt9Y0zCPC3V+SK9a8k4Hl| From: Mark Olbert <ChairmanMAO@newsgroups.nospam> | Newsgroups: microsoft.public.dotnet.framework.aspnet | Subject: Application-wide | Date: Fri, 23 Dec 2005 12:17:01 -0800 | Organization: Olbert & McHugh, LLC | Reply-To: m***@arcabama.com | Message-ID: <temoq1luhp3njdna3fu47tbrjup98n2***@4ax.com> | X-Newsreader: Forte Agent 3.1/32.783 | MIME-Version: 1.0 | Content-Type: text/plain; charset=us-ascii | Content-Transfer-Encoding: 7bit | Lines: 11 | X-Trace: 2R0xXAt!kNpTqtiAJS0Ln0GHEhsQncn06s9eP0EqxUAN992y0qM03iE+I9MF13rzghIfaioDO93s fQ== | X-Complaints-To: ab***@giganews.com TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html | X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers | X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly | X-Postfilter: 1.3.32 | Path: ne.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.gigan ews.com!local01.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.aspnet:366854| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet application-wide business object which caches the results of a database| | I want to bind a series of ObjectDataSource instances to an | query. BTW, so I'm using a DataReader, not a DataTable). The| | I'm confused about where/how to cache the results (it's a simple query, | business object has no knowledge of the application, and hence of the Cache, which is where I would normally put this kind of thing| (actually, I used to put this stuff in global.asax.cs...but since MS in its infinite wisdom has radically redesigned ASP.NET 2, thisShow quoteHide quote | is no longer an option). | | Suggestions? | | - Mark |
Other interesting topics
named anchor
Embedding an image in the html? File security weirdness createing file. Server.Transfer Does Not Invoke IsPostBack in .NET Framework 1.1 Javascript to Set Focus to TextBox Help: Javascript for checking user Protecting files .aspx / .ascx in Visual Studio 2005 Coordination of projects javascript for checking user |
|||||||||||||||||||||||