N
Noozer
I'm writing an ASP application and have a noob question...
I have a class that access an MS SQL database. I have another class also
accesses an MS SQL database and this second class uses objects from the
first class. I have a third class using the DB and objects of the second
class.
Each of these classes contain all the code needed to access the database and
this means much duplicated code. What I'd like to know is if there is a way
to avoid the duplicated code?
I know I could write the code once, then do an #include to include the code
into the class, but that still means multiple occurances of the code.
???
I have a class that access an MS SQL database. I have another class also
accesses an MS SQL database and this second class uses objects from the
first class. I have a third class using the DB and objects of the second
class.
Each of these classes contain all the code needed to access the database and
this means much duplicated code. What I'd like to know is if there is a way
to avoid the duplicated code?
I know I could write the code once, then do an #include to include the code
into the class, but that still means multiple occurances of the code.
???