Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making unique cursor name?
Message
 
 
To
02/02/2008 12:21:54
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01288050
Message ID:
01288520
Views:
12
>>Jim,
>>
>>I was always using meaningful names for my cursor (like TEMP_CURS <g>). And I understand that the actual table name on the local drive is unique. But I was thinking, what if the same class gets used at the same time and the application tries to create TEMP_CURS again, where it already exists. Hence, the problem. So I am going to switch to the sys(2015) approach.
>
>Using datasession object will mean that each session can have cursors with the same name without anything interfering with anything else.
>
>I know of one place that used a public variable to create a "unique" cursor name based on a patient record.
>
>When this public variable got changed in the code, scheduled treatments were "moved" to another patient. Because these people didn't want to learn or change, they put patient lives at risk. They thought their technique was so clever too.
>
>Never use public variables. Use private data sessions.
>

Thank you very much for your input.
"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