Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alen() how to insert record?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00946234
Message ID:
00946237
Vues:
17
Do you run afterwards ReQuery() method of your combo/dropdown list?
Jaime

>I loading an array to be used in a lookup/drop down list, but I need to insert a record into the array for a blank record for "unselecting" a value. The code below ends up replacing the first record with my blank record instead of inserting. Wondering if someone can point out my error.
>
>Thanks
>
>
>IF SQLEXEC(gnConnHandle,[exec dbo.lu_surgeon],"curAssist") < 1
>	***************************************************************
>	* No records for lookup, load a default blank value
>	***************************************************************
>	PUBLIC ARRAY laAssists[1,3]
>	laAssists[1,1]=[]
>	laAssists[1,2]=""
>	laAssists[1,3]=0
>ELSE
>	PUBLIC ARRAY laAssists[1,3]
>	SELECT ALLTRIM(lastname)+[, ]+ALLTRIM(firstName),specdesc,coperid from curassist INTO ARRAY laAssists
>	**********************************************************************
>	* Redimension the array to have an extra record for a zero/blank value
>	**********************************************************************
>	DIMENSION laAssist[RECCOUNT("curassist")+1,3]
>	**********************************************************************
>	* Insert the blank/zero value into the array
>	**********************************************************************
>	AINS(laAssists,1)
>	laAssists[1,1]=[]	&& Last,First Name
>	laAssists[1,2]=""	&& Speciality
>	laAssists[1,3]=0	&& Personnel ID
>ENDIF
>
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform