Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting tablenames from comma delimit
Message
From
23/05/2003 13:01:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00791909
Message ID:
00792322
Views:
37
>>Hi Fred,
>>you may improve your code using the 4th parameter of alines. ::)
>>
>>ALINES(aTables,this.ChildList,.F.,',')
>>
>>Agnes
>>
>>>>Fred,
>>>>I am doing this. I have three table names in childlist property(cnchron,sub_ref,actions)
>>>>All the three times in the loop the first table(cnchron) name is appearing it is not going to the second and the third.
>>>>
>>>>ALINES(aTables,STRTRAN(this.ChildList,",",CHR(13)+CHR(10)))
>>>>FOR nTable=1 TO ALEN(aTables,1)
>>>> * whatever you need to do with aTables[nTable]
>>>> =messagebox("Table "+aTables[nTable])
>>>>ENDFOR
>>>>
>>>>Thank you very much.
>
>But that only works in VFP7 up. What I posted works in VFP6 (maybe 3&5??), too.

3&5 version :)
oDummy=createobject('ListBox')
with oDummy
 .RowSourceType = Value
 .RowSource = lcCommadelimitedList
 dimension arrList[.ListCount]
 for ix=1 to .ListCount
   arrList[ix]=.List(ix)
 endfor
endwith
release oDummy
Code is long but was surprisingly fast (unless liststr is huge).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform