Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy record from one table to another
Message
 
À
25/06/2002 16:21:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00672054
Message ID:
00672184
Vues:
9
I seem to be getting
Data Type Mismatch
right after the append blank. Does the names of the fields in destination table have to be identically to source table? The destination table is identical except the first two characters of the field names (destination) start with AV. Also the destination table has 3 extra fields, they are at they end of the table structure.

Thanks
Nick Patel


>Nick,
>
>Personally, I would still use SCATTER NAME, and move the memo fields separately. See below...
>
>>Unfortunately, I do have memo fields. Can an array hold memo values? If so, I guess I can always do select into array and then insert fields into the second table.
>>
>>>
>>>You are correct. SELECT ... INTO TABLE creates a new table.
>>>
>>>Are there any memo fields involved? You can use a SCATTER/GATHER NAME approach to get the non-memo fields.
>>>
>
>local oFields, lcMemo1, lcMemo2
>
>select lv_veh
>scatter name oFields
>lcMemo1 = lv_veh.memoField1
>lcMemo2 = lv_veh.memoField2
>select vehicle_arc
>append blank   && your new record should get the uniqueID
>gather name oFields
>replace memoField1 with lcMemo1
>replace memoField2 with lcMemo2
>
>>>
>>>HTH
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform