>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