TDatabase Method delete()

TDatabase Method delete()

Postby thefull » Thu Aug 12, 2010 11:08 am

No se porque este method ha cambiado de;

Code: Select all  Expand view
METHOD _Delete() CLASS TDataBase

   if ::lShared
      if ::Lock()
         ( ::nArea )->( DbDelete() )
         ::Commit()
         ::UnLock()
      else
         MsgAlert( "DataBase in use", "Please try again" )
      endif
   else
      ( ::nArea )->( DbDelete() )
   endif

return nil
 


A este parte de esta porción de este peligroso código;
Code: Select all  Expand view
 
   ....
    if lDeleted
         if Set( _SET_DELETED ) // .or. ! Empty( ( ::nArea )->( DbFilter() ) )
            ::Skip( 1 )
            if ::Eof()
               ::GoBottom()
            endif
         endif
      endif
 


¿ Y ese ::SKIP( 1 ) ?

Por mi parte, SIEMPRE acostumbro a, por poner un ejemplo;
Code: Select all  Expand view
while !oDbf:Eof()
         oDbf:Delete()
         oDbf:Skip()
 end while  
 


Así, usando la clase de la última versión, VEO, que hay registros QUE NO SE BORRAN, y todo tiene que ver por el ::SKIP(1 ).
¿ No seria mejor poner un ::SKIP( 0) ?

Lo dicho , ignoro el motivo de ese SKIP, pero el borrar un registro, no debería implicar un salto de registro.
Saludos
Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)
User avatar
thefull
 
Posts: 729
Joined: Fri Oct 07, 2005 7:42 am
Location: Barcelona

Re: TDatabase Method delete()

Postby nageswaragunupudi » Fri Aug 13, 2010 3:39 pm

TDataBase class purposefully retains the functionality of RDD.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10251
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 9 guests

cron