- 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.