Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting all types to string
Message
 
 
To
04/05/2004 16:09:12
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00900921
Message ID:
00900922
Views:
41
This message has been marked as the solution to the initial question of the thread.
Try
TRANSFORM(MyField)
>In the following the type of MyTableField is character. MyCursor.MyField could be character, an integer, a logical, etc. Without an involved IIF statement or CASE statements, is there a way to convert any type to a string without knowing what it is beforehand?
>
>
>
>LPARAMATERS MyCursor
>
>MyVar = ''
>
>SELECT MyCursor
>
>SCAN
>   MyVar = MyVar + ALLTRIM(MyField) + '|'
>ENDSCAN
>
>INSERT INTO MyTable (MyTableField) VALUES (MyVar)
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform