Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find person with longest name
Message
De
26/03/2018 07:49:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01658805
Message ID:
01658991
Vues:
61
>
>do setField3 with "updateTabl", "key_col", "fromTable", "update_Col"
>PROCEDURE setField3 with toTable, keyField1,fromTable2, changeField
>PARAMETERS               toTable, keyfield1,fromTable2, changeField
>	SELECT &toTable
>	REPLACE ALL &changeField WITH ""
>
>	&& to table and set field
>	h=toTable
>	f=keyField1
>	where1 = h + "." + f
>	
>	h=fromTable2
>	f=keyField1
>	where2 = h + "." + f
>
>	h=toTable
>	f=changeField
>	setKey = h + "." + f
>	
>	h=fromTable2
>	f=changeField
>	setKey2 = h + "." + f
>
>	*? &h
>
>	Update  &toTable    From    &&fromTable2			;
>	Where 	&where1 	=      &&where2 			;
>	Set 	&setKey 	  =   &&setKey2
>
>	*USE &toTable
>	*BROWSE WIDTH 10 FONT "courier", 24 TITLE " after the update in procedure"
>	*wait
>ENDPROC
>
In addition to Dragan's comments, I suggest making your parameters local with LPARAMETERS rather than private with PARAMETERS. (Always do this.)

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform