Or you can create tables on disc by UserID and each one in own folder.
Main Topics
Browse All TopicsI have developed a DLL that is being used by web application to retreive and update data directly onto VFP Tables, this is completely functional. How ever i have a need to create a cursor in the DLL, and i am not sure how this will be hanled. Obviously the web server will use this dll to perform its task from various requests that come to it simultaneously, Please let me know your experience on using Cursors with DLL on a multiple user scenario. I fear that it will be error prone.... I hope i am wrong.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
VFP will typically create a temp file on disk for cursors and will definitely do so if the cursor is readwrite. It will be readwrite if you use that keyword or you use CREATE CURSOR or you have a derive dcolumn in your select into cursor. The .tmp file it creates under the hood to manage your cursor has NOTHING to do with how you name the cursor. If you are calling this from a web app and you have many concurrent hits you were at risk of VFP naming the temp file the same thing in the same location if you were running VFP 5 or earlier. VFP 6 claims to have solved this so you should be OK with 7. If you are still worried (which I actually would be) since you will have multiple instances of your dll instantiated that will have no knowledge of what the other one is doing you may want to avoid this risk altogether by using explictily named temp tables that use sessionid or something as their root. Since instances of the same VFP dll cannot be given different config.fpw files there is not reasonable way to change where the temp files will go that are created automatically by VFP. The good news is it should be trivial to write a test ap to stress this theoritical vulnerability. By the way the temp files will go to wherever the API call to GetTempPath says they should go which for anonymous users will always be the same place as far as I know. You may want to try another forum with the question "How can I configure a web app so that GetTempPath returns a different location for each session when all sessions are using user "anonymous"?"
Business Accounts
Answer for Membership
by: CaptainCyrilPosted on 2008-01-22 at 08:30:10ID: 20715694
Creating a cursor will exist in memory unless it's too big.
I suggest creating a new one (new name) each time if you are very worried:
SYS(3) gives you a new name each time it is called.
I have used queries many times in web apps DLLs in FoxPro and had many simultaneous users and never had a problem. Each dll runs in a process and quickly does its work and shuts down.
If you are using a shared dll then I suggest using unique names.
cName = 'C'+SYS(3)
CREATE CURSOR &cName (test C(10))