
centralized data source and data tables for multiple form VB Application
I would start by abstracting out the data access into a separate set of
classes that are designed to do nothing but the data access. Create a
"controller" class that has all of the common information in it (i.e. the
connection string information, and any other special requirements) . Place
them all into a separate DLL (Class Library). Now only use the exposed
interfaces from the DLL to pass the needed data to your forms. (I would
look at possibly having one interface per form).
This give a clean and clear spot for you to do all of the data work in one
place, and lets the rest of your application worry about displaying the
data.
HTH
David
Quote:
> This may be a newbie question but I have to ask to try and save time.
> I am creating a VB.Net application with more than 50 forms and need a way
> to:
> 1) access a centralized group of tables that I can use multiple times
> without requiring form specific data connections, readers, etc. In VB 6 I
> was able to use the Data Environment, what is the .Net equivalent.
> 2) Call a connection string from an .INI file at project start-up,
(already
> am doing) but than use that connection for all data adapters/ readers/etc.
> throughout an entire application. When I change the data source I have to
> go into each form and update it manually, what a pain.
> Any quick hints would be greatly appreciated.