Function BukaTabel
Parameter cNamaTabel,nNomorArea,lBerbagi
lSalah=.F.
ON ERROR DO prossalah with lsalah
Select (nNomorArea)
if lBerbagi=.T.
Use (CnamaTabel) SHARE AGAIN
else
Use (cNamaTabel) EXCLUSIVE AGAIN
endif
ON ERROR
Return .not. lsalah
Procedure prosSalah
Parameter lSalah
wait windows at 19,50("File sedang di lock")Timeout 3
lsalah=.t.
RETURN
Cara manggilnya :
DO WHIL.T.
hasil=BukaTabel('namatabel',1,.T.) &&share
IF hasil=.F.
JWB=pesan2('namatabel.DBF')
IF JWB=6
WAIT''TIMEO(0.5)
LOOP
ENDI
CLOSE ALL
CLOSE TABLES ALL
CLOSE INDEXES ALL
thisform.Release
RETURN
ENDIF
SET INDEX TO namatabelindex
EXIT
ENDD
0 komentar:
Posting Komentar