Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Given datasession howto know a cursor exists
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01007644
Message ID:
01007685
Views:
17
>>Hi all;
>>
>>I want to know if a given cursor in a given datasession exists. What is the optimal/fastest way to do this in code?
>>
>>TIA
>
>You can use AUSED(ArrayName [, nDataSessionNumber [, cTableName]]) and then search in the array (if you did not pass cTableName)
>
>[update]
>Well, I guess you will always pass cTableName, silly me

Something like:
? inUSe('c:\vfp\mytable.dbf', 2)

function inUse
lparameters tcTableName, tnDS
local laInfo(1)

return aused(laInfo, tnDS, tcTableName) > 0
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform