Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to release the cursor?
Message
From
30/07/2006 01:04:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/07/2006 16:18:44
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01141547
Message ID:
01141587
Views:
25
As Sergey notes, a cursor is closed like any table. (Once it is closed, the cursor disappears - it works like a temporary table).

Two more considerations:
  • You might just keep it open, until next time. If you repeat the same SELECT command into the same cursor, it will simply overwrite the previous one.
  • If you keep cursors or tables open in a form that uses a private datasession, the cursor or table will close automatically as soon as the form closes.

    >I used a lot of Select ... from ... into cursor ... in my app.
    >
    >
    >USE (d_purchase) ALIAS i_purchase IN 0
    >SELECT * FROM i_purchase WHERE dInv>=startdate AND dInv<=enddate INTO CURSOR c_purchase
    >USE IN i_purchase
    >
    >USE (d_sales) ALIAS i_sales IN 0
    >SELECT * FROM i_sales WHERE dInv>=startdate AND dInv<=enddate INTO CURSOR c_sales
    >USE IN i_sales
    >
    >
    >and so on...
    >to capture the transactions from other app (difference dbc) to my app.
    >
    >I wonder if I will end up with out of memory problem.
    >
    >how can I release the cursor?
    >
    >thanks for the help.
    >
    >regards,
    >
    >Jerry
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform