Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data truncation with Remote view as a cursor
Message
De
30/10/1996 15:18:37
 
 
À
30/10/1996 15:13:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00011159
Message ID:
00011161
Vues:
39
>I want to create a cursor from a remote view because the data is in SQLServer and shows up in the view as MEMOs which I have trouble displaying in grids etc.
>
>When I use the following command the second field is truncated to 12 characters, I don't understand why.
>
>SELECT ALLTRIM(category), ALLTRIM(subcategory) FROM C2!realcats_distinct INTO CURSOR tt
>
>Any clues folks?
>
>Chris Haynes

It works this way because ALLTRIM(subcategory) for FIRST record in cursor happened to be 12 characters long (you could get another length too!). The safest way to avoid is, firstly, CREATE CURSOR with fixed data structure and , secondly, move data into it.
Also you can choose not to use ALLTRIM function. In this case data will not be truncated (only functions invoke this suspicious behaviour).
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform