Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data truncation with Remote view as a cursor
Message
From
30/10/1996 15:18:37
 
 
To
30/10/1996 15:13:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00011159
Message ID:
00011161
Views:
34
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform