Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Firing multiple select query to store all the values to
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00780348
Message ID:
00780355
Views:
11
>I have two records in the list1
>
>485
>495
>
>for n = 1 to thisform.pageframe1.page3.list1.listcount
>
> col1 = thisform.pageframe1.page3.list1.listitem(n, 1)
>
> select proj_no,projname from abc where proj_no = col1
>
>endfor
>
>I want to store all the records to the list2 which comes from the select query when used
>in this example i get 3 recs for proj_no 485 and 4 recs for proj_no 495
>I want to show all the 7 recs in the list2 could you please tell me how should i handle it after firing the for loop.
>
>Thank you very much.

I would go about it this way
create cursor cuList2 (proj_no, projname)
for n = 1 to thisform.pageframe1.page3.list1.listcount
   col1 = thisform.pageframe1.page3.list1.listitem(n, 1)
   select proj_no,projname from abc where proj_no = col1 into cursor temp
   select cuList2
   append from dbf("temp")
   use in select("temp")
endfor
Tracy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform