Can I open a DBF Shared, and later do a FLock() to make a ZAP()??????????????????????????????????
I open a DBF in this way - I'm using TData from Mr. James Bott
- Code: Select all Expand view RUN
CLASS TSala from TXData
Method New()
ENDCLASS
Method New() CLASS TSala
::super:New(,"BASE", , )
return self
SysRefresh()
When I want to do a ZAP(), I doit this way... but don't work.
BASE := Tsala():New(,,,.F.)
IF BASE:Lock()
MsgInfo("bloqueado") --------------------> The message is shown
BASE:SetOrder(1)
BASE:ZAP() -----------------------------> Here a meesage is shown "Error DBFCDX/1023 Exclusive required.
BASE:UnLock()
Else
MsgInfo("Error asl bloquear archivo", "Informe")
RETURN(.F.)
Endif
Application
===========
Path and name: C:\Fuentes\omegainmo\omegainmo.Exe (32 bits)
Size: 5,685,248 bytes
Compiler version: Harbour 3.2.0dev (r1703231115)
FiveWin version: FWH 17.05
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 11 secs
Error occurred at: 22/06/2017, 01:52:23
Error description: Error DBFCDX/1023 Exclusive required
Stack Calls
===========
Called from: => __DBZAP( 0 )
Called from: .\source\classes\DATABASE.PRG => (b)TDATABASE( 179 )
Called from: .\source\classes\DATABASE.PRG => TSALA:ZAP( 0 )
Called from: omegaprnt.prg => SALDOAEXCEL( 3851 )
Called from: omegainmo.PRG => (b)NU_SALDOS( 605 )
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1350 )
Called from: omegainmo.PRG => NU_SALDOS( 621 )
Called from: omegainmo.PRG => (b)MAIN( 130 )
Called from: trbtn1503.prg => TRBTN:CLICK( 715 )
Called from: trbtn1503.prg => TRBTN:LBUTTONUP( 915 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1721 )
Called from: trbtn1503.prg => TRBTN:HANDLEEVENT( 1617 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1036 )
Called from: omegainmo.PRG => MAIN( 426 )
Thank you very much.
Sorry for my bad English.
Best regards Ruben Dario Fernández
It,s very late here. I'll be sleeping a few hours.