Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with REPLACE command calling an object method
Message
De
12/01/2010 12:33:03
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01443405
Message ID:
01443445
Vues:
48
>>I need to call a method on an object to get PKs for records I have dumped into a local cursor.
>>
>>I have a Business Object that can return the next PK, but I cannot figure out how to call it.
>>
>>What do I need to do?
>>
>>
>>replace ipkey With this.oParentBO.CreateNewID() All In &lcLocalCursor
>>
>
>You don't need a macro substitution in this case
>
>
>replace ipkey With this.oParentBO.CreateNewID() All In (lcLocalCursor)
>
The issue seemed more to do with the fact that it would only change the FIRST row, and not all the rows in the cursor.
I had to switch to this approach:
Select (lcLocalCursor)

Goto top

Scan 
 lnPK = this.oParentBO.oLineItems.CreateNewID()
 replace ipkey with lnPK in (lcLocalCursor)
EndScan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform