tDatabase

Re: tDatabase

Postby James Bott » Thu Mar 04, 2010 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: tDatabase

Postby nageswaragunupudi » Thu Mar 04, 2010 5: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
User avatar
nageswaragunupudi
 
Posts: 10627
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests