Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How often is SYS(2015) changed?
Message
 
 
To
26/08/2011 22:53:36
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01521892
Message ID:
01521982
Views:
47
>>>>>>Hi,
>>>>>>
>>>>>>I have a routine where the application gets (via SQL select) records into one cursor from one table, then into another cursor from another table, and then again into the 3rd one. For each cursor I use value of SYS(2015). Since the SQL Select time from one cursor to another may take a second or two or could be less than a second. Can I rely that each value of SYS(2015) is unique if it is called within less than a second?
>>>>>>
>>>>>>UPDATE: I did a test of running from one .prg SYS(2015) one after another (obviously with less than a second between each) and all names appear to be unique.
>>>>>
>>>>>If you mean to use unique values for cursor names, then it's useless and you better use meaningful names. Using unique names only makes sense if you're generating a permanent table.
>>>>
>>>>I always thought that using meaningful names could be a problem of one cursor "stepping" on another. Thank you.
>>>
>>>As long as you use a different meaningful name for each cursor in the same data session, there's no problem.
>>>
>>>Tamar
>>
>>But could the following scenario happen? Say, the application creates a cursor named "MyCursor." Isn't it true that the temp folder of the PC now has a file MyCursor? Then for some reason, the application locks up and does not have a chance to close all cursors. So when user starts the application again ant it attempts to create a cursor "MyCursor" wouldn't you get a message that the file already exists?
>
>The name of the temp file is not related to the name of the cursor, it has a random name which VFP makes sure is unique. Try
>Create Cursor curDummy (Name c(10))
>?Dbf('curdummy') && The name of the file
I got it. Thank you for clarifying.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform