-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: VishalRJoshi
Message 20 in Discussion

 Design Days - Data Access Ways

This is just a small little thought, which I thought, can be shared... When
we try to access data from a table in DataSet many a times we have to use
the name of the columns... We have multiple Datagrids bound to each table
and many other controls of your page also access data from these tables...
Now, just in case your column name changes in the table you would want to
have minimum impact on the stuff that you have to change...
As a solution to this you can have DataDefinition class... This class can
just return back the name of the columns as properties, you can define these
light weight classes if you have less number of tables to be accessed... In
any case if you do not follow this approach then it is always advisable to
have constants declared at a common location and store your column names in
there....
You can later use either these constants or light weight classes to get the
column names...

PS: Do note that by introducing such things you can make your design more
maintainable but sometimes loose on performance... Take decisions on the
basis of what is ideal for your situation... Don't sue a poor fella like me
for suggesting, you anyways won't get much... :-)
 
Vishal Joshi
Microsoft MVP .Net
       If You Think YOU CAN... You Can...
http://VishalJoshi.Blogspot.com
http://www.microsoft.com/india/mvp/indiamvp.aspx
http://groups.msn.com/ChennaiNetUserGroup 
http://groups.msn.com/CNUG-DAM 
http://groups.msn.com/NetBloomingtonUserGroup 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to