Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip o' the Day: ALTER TABLE on a Cursor
Message
De
16/02/2001 15:48:18
 
 
À
16/02/2001 11:55:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476591
Message ID:
00476807
Vues:
28
>please help me understand the use again statement.
>
>use out
>select * from out into cursor temp where out_pk = 1001
>
>select temp
>browse
>* temp has one record
>
>USE DBF('temp') AGAIN IN 0 ALIAS temp2
>select temp2
>browse
>* temp2 has all the records in out
>
>replace out_pk with 1002
>
>*not only does it change the record in temp2 but it changes the record in out
>
>what if you don't want the changes to reflect in the out table, you only want to modify the cursor. do you have to use the create cursor statement.

IF you don't want to use USE ... AGAIN, you can
SELECT ;
  ...
  INTO CURSOR Temp1

=AFIELDS(laArray)
CREATE CURSOR Temp2 FROM ARRAY laArray
SELECT Temp2
APPEND FROM (DBF("Temp1"))
USE IN Temp1
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform