Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clearing a Cursor
Message
De
14/03/2001 19:53:29
 
 
À
14/03/2001 10:49:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00484870
Message ID:
00485116
Vues:
12
>IN VFP6
>I create a temporary cursor in the load of a form. I have a grid that will display this cursor on one of my pages. To input data in this cursor I manipulate two different tables into this cursor. Off this form I have the ability of choosing another agent. at this time I need to clear out all the data in the cursor and start again for the new agent. I tried ZAP but was told this command can not be issued on a table with cursors in table buffering mode. I tried CLEAR RESOURSES feetable (where feetable is the name of my cursor) but it did not clear out the cursor it just keeps adding to the existing records. What should I be using to clear the cursor out. Do I need to close it and create it everytime?
>Thanks for the help!

Here is yet another way to handle a cursor... turn it into a cursor with a disk presence (this will allow you to edit or delete records)


procedure update_cursor
PARAMETER TCURSOR
LOCAL JLINE

IF .NOT. 'TMP' $ DBF(TCURSOR)
=MESSAGEBOX('You have not passed a cursor with a disk presence, include a where .t. in the sql select statement...',16,'SYSTEM MESSAGE')
RETURN
ENDIF

JLINE='USE '+ DBF(TCURSOR)+ ' IN 0 AGAIN ALIAS '+ TCURSOR+'_UPDATE'
&JLINE

JLINE='SELECT '+ TCURSOR+'_UPDATE'
&JLINE

RETURN
Thanks,

Stacy



Black Mountain Software, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform