ASP.Net 1.1 Application Object & ADO.Net DataSet

G

Guest

All,

I have a VB.NET/ASP.NET application that uses some common data throughout.
Now what I would like to do is instead of hitting the database every time to
fetch back two dataset of 5 rows 2 cols I would like to use the application
object to store these 2 dataset. I would like to know if this is advisable
and will there be any performance issues?

Thanks
Msuk
 
C

Cowboy \(Gregory A. Beamer\)

If the data does not change often, caching the data once for the application
is a good idea. If the data does change, but not for a session, then caching
for session is a good idea. I employ the technique regularly, as fetching
the same result set over and over is NOT a wise idea, unless it is changing
some how.

Performance issues? Provided you are not storing huge chunks of the database
in memory (or worse in memory for every session), you will find that the
issue is it performs much better than pulling the data every time.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
E

Eliyahu Goldin

This will be fine. Normally you would want to use a session variable for
that.

Eliyahu
 
G

Guest

Hi,

Thanks for your help. I am now storing the data in the application object
that is loaded on the by Application_Start event in the global.asax

As I am testing my website I am occasionally changing the data in my
database then stop/starting my website but the application object is not
refreshing with the new data from the database. The only way I have found to
perform a refresh is by stop/starting the IIS box. Now in my production
environment this won’t be possible as I my site will be running with many
others so how can I perform a refresh of data.

Thanks
 
G

Guest

Hi,

The only reason I am using the application object is because it is simply
holding lookup data that will be common for every user but there could be a
requirement to change the lookup data maybe once in the year. On my
productions servers I will not be able to stop/restart iis so would a session
object be better? Is there not a way to clear out the application object for
my particular site.

Thanks
Msuk
 
E

Eliyahu Goldin

Is there any particular reason you are using an application object rather
than a session variable?

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top