[AccessD] Classes, Recordsets, and problems inbetween

John Colby jcolby at colbyconsulting.com
Mon May 12 08:52:10 CDT 2003


Arthur,

Disclaimer: I have been out of real OO for way too long, and just getting
back in with VB.net so you can of course take anything I say on the subject
with a grain of salt.

I was simply trying to give Gustav a feeling for the concept.

I read all of this stuff in my book a month or two ago and was going on
memory.  We all know what THAT means! ;-)

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Arthur Fuller
Sent: Monday, May 12, 2003 9:28 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Classes, Recordsets, and problems inbetween


Not quite, JC. Overloading means that a single method name can have several
signatures. The second through nth overload need not be in a child class.
Any given class, for example, could have two or more Init() methods: one
that takes no parameters, one that accepts say an int and a string, and a
third that accepts an int, a string and a date. The rules of overloading
are: you cannot have two methods with identical signatures. If you create a
child method with the same name as a parent method, that calls the parent
method either before or after running its own code, that is not overloading;
that is extending.

Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: May 12, 2003 8:52 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Classes, Recordsets, and problems inbetween


Gustav

With true OO with inheritance, a function that is available in the parent
class can be replaced in the child class so that whatever functionality the
parent's function provided can be overriden.  Overloading is a method of
performing this processing in the class, but further allows the parameters
passed in to the class to be replaced as well.  For example FunctionA in one
child class may accept an integer, in another it may accept a real.  Since
the parameters are different, the correct child class can automatically be
selected by the runtime based on the type of data passed in.  If I am
passing in an integer I must be intending to use that specific child class,
whereas if I pass in a float I must intend to use this other child.

Since Access only has interface inheritance, it doesn't implement any of the
OO stuff of more powerful languages (such as VB.Net), and all discussions of
such capabilities is moot.

John W. Colby
www.colbyconsulting.com






More information about the AccessD mailing list