Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy record from one table to another
Message
De
25/06/2002 16:49:23
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00672054
Message ID:
00672188
Vues:
10
Nick,

Right after the APPEND BLANK? Or on the APPEND BLANK? This error could occur on the APPEND BLANK statement if the value being returned by your uniqueID function is returning a different data type than that field is expecting to receive.

The GATHER command would cause this error to occur if you had a field in each table with the same name but with different data types. For example, if in one table the field is numeric, and in the second table it is character.

Yes, the fields in both tables have to have the same names, or else you are going to REPLACE all the fields from one table to the other individually. The ones with different names will be ignored by the GATHER NAME command (no error would occur, but the data will not make it to the second table).

>
>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.
>
>>>>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
>>>>
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform