I think I've somehow missed a basic design principle for storing data from databases.
What is the "correct" way to store data that your whole application needs access to, regardless of which forms are open or which class is reading the data? I would like to store datasets apart from forms, but don't know how to create them in their own space so that they can be referenced in code at design time.
When I started programming, I was using the AppDomain for everything but realized that it isn't designed for holding a whole database. I use per-table SQL Select statements when I need to load data, am extending my subs to also do per-ID-range SQL Selects for reloading chunks of a table, and the AppDomain doesn't work the way I though it did.
My other idea is using My.Settings to store datasets, in addition to configuration options. Would that work? I wouldn't want to keep the datasets when closing the program.
What is the "correct" way to store data that your whole application needs access to, regardless of which forms are open or which class is reading the data? I would like to store datasets apart from forms, but don't know how to create them in their own space so that they can be referenced in code at design time.
When I started programming, I was using the AppDomain for everything but realized that it isn't designed for holding a whole database. I use per-table SQL Select statements when I need to load data, am extending my subs to also do per-ID-range SQL Selects for reloading chunks of a table, and the AppDomain doesn't work the way I though it did.
My other idea is using My.Settings to store datasets, in addition to configuration options. Would that work? I wouldn't want to keep the datasets when closing the program.
Comment