SYS(2336) - Critical section support for code in ActiveVFP script files

Topics: Developer Forum, User Forum
Jun 24 at 10:34 PM
Hi,

How can I add "Critical section support" in my ActiveVFP script files ? I am not using a COM DLL of my code but only using script files.

How the code is protected in ActiveVFP while adding a new PK, creating a common file or locking vfp tables etc. ?

Thanks
Coordinator
Nov 3 at 5:04 PM
I really didn't understand your question. Could you elaborate it a little more?

Victor
Nov 19 at 7:39 PM
While adding/updating records in vfp tables, do i need to use SYS(2336,1) in my ActiveVFP multi user applications.

for example

select IdentityTable
SYS(2336,1)
=rlock()
replace id with id+1
unlock
SYS(2336,2)

Or

SYS(2336,1)
if !file("C:\mydata\test.dbf")
create table test (test C(30))
endif
SYS(2336,2)
Coordinator
Nov 30 at 1:46 PM
I see now. I honestly didn't know about SYS(2336), and the best info I could find in the NET was this. Any way, it sounds like a good idea to use it as you propose.


Victor Espina