Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why only one record created in my cursor?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01209944
Message ID:
01209965
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform