OO Programming
Encapsulating Recordsets
One of the first things that you encounter when moving to object-oriented (OO) programming are beans. Beans are simple representations of a business object (like a user or a product) that hide all of the information stored in the bean behind methods (functions) for getting and setting the information (called, unsurprisingly, getters and setters).
Reader Feedback : Page 1 of 1
#2 |
Hi Michael, Good catch! That was indeed a little messy and is something I plan to clean up later this month. if you're interested, I'll be reposting code on my Blog. I'm probably going to use isDone(), but will take a little time to look at some other iterators to see what syntax is most popular. |
#1 |
Michael Long commented on the 26 Nov 2006
Could just be me, but I'd expect a function named "isLast" to return true if I'm actually on the last record. Which would in turn lead to an off-by-one error, as the loop would terminate early. Better, perhaps, would be isEOF, or isDone, either of which would be true if the current record count is greater than the actual record count. |