Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Firing multiple select query to store all the values to
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00780348
Message ID:
00780355
Vues:
13
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform