FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TDatabase
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Bug in TDatabase
Posted: Wed Aug 03, 2011 02:24 AM
These are the lines from 563-565 [method _delete()]
Code (fw): Select all Collapse
         if ::IsRecLocked( ::RecNo() ) .or. ( lLocked := ::RecLock( ::RecNo() ) )
            ( ::nArea )->( DbDelete() )
            lDeleted := .f.


Shouldn't lDeleted := .t. instead of .f.?

And since the success of delete operation is already tracked using lDeleted, wouldn't it be better if method _delete() returns lDeleted instead of nil?

TIA
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Bug in TDatabase
Posted: Fri Aug 05, 2011 04:06 AM
Shouldn't lDeleted := .t. instead of .f.?

You are right. Thanks for pointing out.
Fixed and available from next release.

And since the success of delete operation is already tracked using lDeleted, wouldn't it be better if method _delete() returns lDeleted instead of nil?

At present the return value is compatible with the return value of DBDELETE() function in RDD.
But I agree its a better idea to return lDelete instead.
This also will be available from next release.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion