Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Approach to make DataSet remain in memory
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Approach to make DataSet remain in memory
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01447680
Message ID:
01447680
Views:
129
Hi,

I have the following scenario of using a lookup on a form:

I have a user control that has a text box and a button. The user control resides on the form (call it parent form). When user clicks on the button a modal form (call them Lookup form) is opened with a grid showing data from a database table. This data is in a dataset that is retrieved from the database via call to a stored procedure. The dataset can be retrieved when the Lookup form is instantiated. The problem is that user clicks on a lookup button and selects an item from a lookup form, then closes it (moving to another control on the Parent form). So every time user clicks on a lookup button the program has to make a trip to the database to get the data.

Is there a way to make the retrieved data set remain in the memory in order to minimize trips to the database?

One scenario I am thinking is that the data set can be retrieved in the parent form. Then I would assign the data set to a field of the parent form. But how would the lookup form (the one called from click on the lookup button) would have this dataset "visible"?

Any suggestions will be greatly appreciated.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform