compusale Posted June 10, 2005 Posted June 10, 2005 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? Quote
Administrators PlausiblyDamp Posted June 10, 2005 Administrators Posted June 10, 2005 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 it's 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. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
bri189a Posted June 10, 2005 Posted June 10, 2005 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.