Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why only one record created in my cursor?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01209944
Message ID:
01209965
Vues:
9
This message has been marked as the solution to the initial question of the thread.
>I am moving record from list to list2 record move successfully, but in curosr only one record found
>
>
>#define HEADER_LOC	"Selected items:"
>
>ACTIVATE SCREEN
>? HEADER_LOC
>? "---------------"
>FOR nCnt = 1 to ThisForm.container1.list2.ListCount
>	? SPACE(5) + ThisForm.container1.list2.List(nCnt)
>ddd= ThisForm.container1.list2.List(nCnt)
>ENDFOR
>	
>		SELECT code, descr;
> FROM student;
>			where code = ddd ;
>						into cursor csrmycursor
>	

			
Try this (from the top of my head)
create cursor curListItems (cListItem C(10)
FOR nCnt = 1 to ThisForm.container1.list2.ListCount
	? SPACE(5) + ThisForm.container1.list2.List(nCnt)
 cListItem = ThisForm.container1.list2.List(nCnt)
  insert into curListItems from memvar
ENDFOR

 SELECT code, descr ;
 FROM student inner join curListItems on ;
  Student.code = curListItems.cListItem ;
 into cursor csrmycursor
BTW, what is your listbox rowsource? If you want to use all list items and not only selected, why not to use its rowsource if it's a cursor?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform