Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create cursor error in VFP9SP1
Message
 
À
23/11/2006 02:29:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01171987
Message ID:
01171989
Vues:
10
Hi Daniel,

Look at array in watch window before changing size and after changing size.

In VFP 7.0 has array 16 columns, but in VFP 8.0 18 Columns.

You redimension row must be:
liCount=ALEN(Farray,1)+1
DIMENSION Farray[liCount,ALEN(Farray,2)]
Farray[liCount,2]="C"
.
STORE 0 TO Farray[liCount,17],Farray[liCount,18]

...
MartiJ

>Hi, All.
>
>Hope someone can help me.
>I encountered a syntax error when run on VFP9SP1 but it worked fine on VFP7. Can anyone tell me what's wrong. It seemed I missed something. I intend to add another field into an existing table structure (wk_equipment) and create a cursor (cwk_equip) from it.
>
>Thanks in advance.
>
>Regards
>Daniel
>
>Here is the code:
>
>
>SELECT wk_equipment
>=AFIELDS(Farray)
>DIMENSION Farray[(ALEN(Farray)/16)+1,16]
>Farray[ALEN(Farray)/16,1]="PNAME1"
>Farray[ALEN(Farray)/16,2]="C"
>Farray[ALEN(Farray)/16,3]=45
>Farray[ALEN(Farray)/16,4]=0
>Farray[ALEN(Farray)/16,5]=.F.
>Farray[ALEN(Farray)/16,6]=.F.
>Farray[ALEN(Farray)/16,7]=""
>Farray[ALEN(Farray)/16,8]=""
>Farray[ALEN(Farray)/16,9]=""
>Farray[ALEN(Farray)/16,10]=""
>Farray[ALEN(Farray)/16,11]=""
>Farray[ALEN(Farray)/16,12]=""
>Farray[ALEN(Farray)/16,13]=""
>Farray[ALEN(Farray)/16,14]=""
>Farray[ALEN(Farray)/16,15]=""
>Farray[ALEN(Farray)/16,16]=""
>
>CREATE CURSOR cwk_equip FROM ARRAY Farray  && Error occurs here in VFP9SP1
>SELECT cwk_equip
>
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform