Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...