Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting all types to string
Message
From
04/05/2004 16:09:12
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Converting all types to string
Miscellaneous
Thread ID:
00900921
Message ID:
00900921
Views:
84
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)
Next
Reply
Map
View

Click here to load this message in the networking platform