Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How often is SYS(2015) changed?
Message
 
 
To
27/08/2011 08:08:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01521892
Message ID:
01521983
Views:
53
>>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.
>
>I am not sure what exactly you want to achieve, but selecting ... INTO CURSOR TEMP for example, will automatically assign random names (presumably based on sys(2015)) to the underlying temporary table created for the cursor. For the cursor as seen from your program, I would prefer to assign consecutive names, like MyCursor001, MyCursor002, etc., or MyCursor1, MyCursor2, etc. - that would make it easier to follow-up. These names won't conflict with the same names used by another user, since the underlying temporary tables.

Thank you. I am not arguing with you but in my view, if I am to assign names to the cursors, I would prefer to make them more meaningful. Like "cur_MyTable1" and so on. This would help in reading and maintaining the code. Just a personal preferences.
"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
Next
Reply
Map
View

Click here to load this message in the networking platform