web forms and acccess file definition

compusale

New member
Joined
Jun 10, 2005
Messages
1
I have a project with 35 web forms and an acccess file with 18 tables.
Is there any way that I can make the file definition only once and every web form would take it from there?

I mean until now I automatically generate the datadapters by dragging the tables from the server explorer . But every time I change a single field I have to repeat the proces on my 35 web forms!!!!
How can I avoid this?
 
You could store the connection string in the web.config so you only need to change one location.
Alternatively you may be better of encapsulating your data access inside a class of its own and use that for all data access. A pretty good example of doing this can be found as part of Microsofts Patterns and Practices site.
 
On that note a lot of people have there DAC/DAL (Data Access Component/Data Access Layer) in a whole seperate project so that the DLL could be used in a ASP or Windows application or future applications, that way if something changes you just redeploy the DLL instead of the whole APP.
 
Back
Top