|
-
Mar 18th, 2020, 08:09 AM
#1
Thread Starter
Junior Member
System.Runtime.Caching for a Datatable in a WinForms App
I have a winforms application that has an sql backend. I have a dataset for the database in my project and use table adapters. My database has a roster table that is only updated once a week, so it rarely changes. It has a lot of records in it. Each form i use that datatable, i need to do the .fill to get the data. This is slowing down my application and takes awhile to load. Want I want to do is have a class or something where when I open a form that requires the roster data to check a cache, if it exists, then use it, otherwise load it. I have been searching for the right solution for days, and I just cant figure out caching in winforms. I am by no means an expert on programming. I use VB.net.
I have found a few ideas, but do not know how to implement any of them. I know there is the ASP.NET caching method, static method, and system.runtime.caching method.
Can anyone help me put together a solution. Assume I am dumb, because I am. I just make my application work by any means necessary. I dont know what statics are, etc.
Basically I want to load my roster table into cache when it is called the first time, and then be used throughout the application from cache as needed. I want to do the same for lookuptables (that have a lot of records). When the application closes, the cache should be cleared.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|