Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code for Cursor Readwrite
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Code for Cursor Readwrite
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057981
Message ID:
01057981
Views:
51
Looking for ways to make my code more efficient or at least not as embarressing.

1) have a VFP free table1.dbf. Want to select records from table1.dbf and then end up with a readwriteable cursor called table1.dbf. Currently I have the following sloppy lines of code.
IF used("QM_cond") 
   USE IN qm_cond
ENDIF
USE qm_cond IN 0
SELECT * FROM qm_cond into CURSOR temp READWRITE ;
   WHERE f_query_id like qm_list.f_query_id+'%'
USE IN qm_cond   
SELECT * FROM temp INTO CURSOR qm_cond readwrite
USE IN temp
SELECT qm_cond
INDEX ON F_QUERY_ID TAG F_QUERY_ID
SET ORDER TO TAG F_QUERY_ID
2) do some processing, then want to then update table1.dbf with the records from cursor table1. currently I am co
SELECT * FROM qm_cond INTO CURSOR temp
USE IN qm_cond
USE c:\rt50vss\data\qm_data\qm_cond IN 0
DELETE FROM qm_cond WHERE f_query_id like qm_list.f_query_id+'%'
SELECT qm_cond
APPEND FROM DBF('temp')
USE IN temp
Any suggestions are appreciated

Brenda
Next
Reply
Map
View

Click here to load this message in the networking platform