I use this code to check if the table is in use:
local llerror
llerror=.f.
lcStlFileName="02155.stk" (it's a dbf)
ON ERROR llerror = .T.
lcStkl= SYS(5)+CURDIR()+'BELEGE\'+ lcStlFileName
SELECT 0
USE &lcStkl EXCLUSIVE ALIAS 'ITEMLIST'
IF llerror
thisform.Caption = "file is in use !!!"
ENDIF
when I step it through
I can see the file was not opend (is not there)
but the error don't trigger llerror
llerror is still .f.
if I make the same procedure in command-window it works
tia
ron
local llerror
llerror=.f.
lcStlFileName="02155.stk" (it's a dbf)
ON ERROR llerror = .T.
lcStkl= SYS(5)+CURDIR()+'BELEGE\'+ lcStlFileName
SELECT 0
USE &lcStkl EXCLUSIVE ALIAS 'ITEMLIST'
IF llerror
thisform.Caption = "file is in use !!!"
ENDIF
when I step it through
I can see the file was not opend (is not there)
but the error don't trigger llerror
llerror is still .f.
if I make the same procedure in command-window it works
tia
ron