aused()
asession()
ornek:
CLEAR
PUBLIC oSess1,oSess2
oSess1=createobject('mySession','customer,orders')
oSess2=createobject('mySession','customer,orders,orditems')
ListTablesInUse()
RELEASE oSess1, oSess2
? "After release"
ListTablesInUse()
Function ListTablesInUse
Local oObj, lnInUse, ix, jx
Local array arrInUse[1], aSessList[1]
FOR ix = 1 TO ASESSIONS(aSessList)
? "Session ID", m.ix
FOR jx=1 TO AUSED(arrInUse, aSessList[m.ix])
? " Cursor:", arrInUse[m.jx,1]
endfor
endfor
Define class mySession as Form
DataSession = 2
Procedure init
Lparameters tcTableList
Local lnTables,ix
lnTables = ALINES(arrTables,CHRTRAN(tcTableList,',',CHR(13)))
For m.ix=1 TO m.lnTables
Use (arrTables[m.ix]) IN 0
SELECT * from (arrTables[m.ix]) INTO CURSOR (SYS(2015))
Endfor
Endproc
Enddefine
Kullanimdaysa ne olur? Ona gore dusun. Exckusive'e ihtiyacin var ise on error ile exclusive kullanmayi dene, ISExclusive() ile kontrol et.
Yen yaz 1907'ye yolla FB gelsin evinde yensin.
(sonra salaklar ciksin alin terine şike desin)