Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code for Cursor Readwrite
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057981
Message ID:
01058009
Views:
24
Your help is always appreciated.

Guess I will keep my sloppy code, it does accomplish what is needed.

Thanks for the help

Brenda



>I should try next time before posting, sorry.
>
>>I have a huge amount of third party code that expects to use qm_cond. Qm_cond has gotten too large to remain open with all the records. So I am selecting off the records for a single unit, and putting them in qm_cond so that the rest of the code does not have to change.
>>
>>USE qm_cond IN 0 ALIAS qm_cond_table
>>SELECT * FROM qm_cond_table into CURSOR qm_cond
>>
>>this produces an Alias Name is Already in Use. Even though the alias is qm_cond_table, VFP will not let a cursor qm_cond get created because the qm_cond table is open.
>>
>>
>>>I would strongly recomend to modify your code to use a cursor name that is different from any existing table name. Otherwise you may unknowingly use cursor instead of table and vise verca. If you insist on doing that, try
USE IN ( SELECT("qm_cond"))
>>>USE IN ( SELECT("qm_cond_table"))
>>>
>>>
>>>USE qm_cond IN 0 ALIAS qm_cond_table
>>>
>>>SELECT * FROM qm_cond_table into CURSOR qm_cond READWRITE ;
>>>   WHERE f_query_id like qm_list.f_query_id+'%'
>>>INDEX ON F_QUERY_ID TAG F_QUERY_ID
>>>SET ORDER TO TAG F_QUERY_ID
>>>
>>>...
>>>
>>>SELECT qm_cond_table
>>>APPEND FROM DBF('qm_cond')
>>>
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform