Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM ARRAY problems...
Message
De
26/08/1997 15:42:41
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046997
Message ID:
00047006
Vues:
24
>Alex,
>
>>Try this :
>>DIMENSION laTest(3,1)
>> laTest(1,1) = "1"
>> laTest(2,1) = "2"
>> laTest(3,1) = "3"
>> CREATE CURSOR cTest (TestField C(1))
>> APPEND FROM ARRAY laTest
>> BROWSE
>> USE IN cTest
>>Alex.
>
>
>It worked! In my application I'm actually doing a SELECT INTO ARRAY, but I'm adding a row using DIMENSION (ALEN() + 1) along with AINS().
>
>Do you know why it didn't work the other way?

I'm pretty sure that VFP assumes a one-dimensional array is a single row. Try modifying the original CREATE to :
CREATE CURSOR cTest(Field1 C(1), Field2 C(1), Field3 C(1))

I think you'll populate all 3 fields if you append from a one-dimensional array.
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform