FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour tDatabase
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: tDatabase
Posted: Thu Mar 04, 2010 04:44 AM

Rao,

Thanks for all the info and a good solution.

One advantge to using a record class is that you can subclass it and add methods to better emulate a real-word object. For instance adding an Age() method which automatically calculates the age based on the date-of-birth and the current date. Or adding an AcceptPayment() method to a customer record which might post data into multiple databases like an invoice database, a general ledger database, and an audit database in addition to updating the customer file.

And you can also use such a class when you are not using a browse.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: tDatabase
Posted: Thu Mar 04, 2010 05:39 AM
James Bott wrote:Rao,

Thanks for all the info and a good solution.

One advantge to using a record class is that you can subclass it and add methods to better emulate a real-word object. For instance adding an Age() method which automatically calculates the age based on the date-of-birth and the current date. Or adding an AcceptPayment() method to a customer record which might post data into multiple databases like an invoice database, a general ledger database, and an audit database in addition to updating the customer file.

And you can also use such a class when you are not using a browse.

James

Yes Mr. James. I do agree with you. My intention was not to understate the merits of TRecord class, but to explain the use of a less known but very useful method of XBrowse.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion