Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why only one record created in my cursor?
Message
From
29/03/2007 13:52:22
 
 
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:
01209952
Views:
16
>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
>	



Hi Khubaib,

It looks like that is because your select statement is using ddd and is outside the for loop
so it is only going to get the last item in your list. You need the select statement inside
the for loop to get all.

HTH
Beth
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform