470,619 Members | 1,463 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

DATA ACCESS COMPONENT (OBJECT ORIENTED)

DRU
Hi People

I have a design issue

I have atleast 6 to 7 forms whose main functionality is to
add a new record , delete a record and update records

zipcodeform -- front end form variables( zipcode.text ,
zipstate.text)

citycodeform-- front end form variables(citycode.text ,
cityname.text,cityregion.text)

addressform -- front end form variables(address1.text ,
address2.text,telephone.text)
..
..
..
----
..
..
----
..
..
The above forms have the same functionality as in adding a
new record , updating old records or deleting some records

So wont it be easy to write a class with 3 methods

DBinsert()
DBupdate()
DBdelete()

and over load these functions to

get desired result instead of having a class like
zipcodeclass , citycodeclass and addressform class and
having
to repeat the same functionality

instead I am having a basedbclass and the overlaoding the
methods

Is it the rite way to do this
Suggestions , comments of any type accepted
Thanks
DRU
Nov 17 '05 #1
1 928
Sounds like a fairly standard approach if I understand you correctly.
You have a few business objects (zipcode, citycode and address) that in turn
use your data access class that encapsulates the database work.
Pretty typical 3 tier system. Nothing wrong with that.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"DRU" <bo*****@yahoo.com> wrote in message
news:04****************************@phx.gbl...
Hi People

I have a design issue

I have atleast 6 to 7 forms whose main functionality is to
add a new record , delete a record and update records

zipcodeform -- front end form variables( zipcode.text ,
zipstate.text)

citycodeform-- front end form variables(citycode.text ,
cityname.text,cityregion.text)

addressform -- front end form variables(address1.text ,
address2.text,telephone.text)
.
.
.
----
.
.
----
.
.
The above forms have the same functionality as in adding a
new record , updating old records or deleting some records

So wont it be easy to write a class with 3 methods

DBinsert()
DBupdate()
DBdelete()

and over load these functions to

get desired result instead of having a class like
zipcodeclass , citycodeclass and addressform class and
having
to repeat the same functionality

instead I am having a basedbclass and the overlaoding the
methods

Is it the rite way to do this
Suggestions , comments of any type accepted
Thanks
DRU

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Tony Lee | last post: by
21 posts views Thread by ambika | last post: by
3 posts views Thread by Simon Harvey | last post: by
1 post views Thread by Patrick | last post: by
122 posts views Thread by Edward Diener No Spam | last post: by
3 posts views Thread by RAR in WA | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.