Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan endscan skipping last record
Message
From
14/02/2003 14:51:46
 
 
To
14/02/2003 14:22:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00753383
Message ID:
00753400
Views:
12
>Tried it, that didnt help, thanks for the go top tip though.
>Here is an explination of why the select 'diecmm' wouldnt help:
>
>SCAN always reselects the right work area (the one the loop started in) when it reaches ENDSCAN, so you don't need to reselect even if you've changed work areas inside the loop. We know a lot of people who do so anyway. There doesn't appear to be a performance penalty for this, so if you're the belt-and-suspenders type, go right ahead.

well i dindn't know that. normaly i am not a belt-and-suspenders type but if there is no perfomance loss, hey why not, just to be safe.

hmm, then i don't know. i would try (just for the heck of it) to take the for clause out of the scan command and see what happens, to try to 'fence in' the problem.


>
SELECT 'diecmm'
>SCAN FOR !(diecmm.imported)
>	*replace diecmm.imported WITH .t.
>	SCATTER memvar
>	SELECT 'dieactualdata'
>	LOCATE FOR dieactualdata.jobnum=m.jobnum AND dieactualdata.itemnum=m.itemnum
>	IF FOUND()
>		IF m.atd1>0
>			SELECT 'dieparams'
>			LOCATE FOR dieparams.jobnum=m.jobnum
>			IF FOUND()
>				m.atl1=dieparams.tl1/2
>				IF m.atd2>0
>					m.atl2=dieparams.tl2/2
>				endif
>			ELSE
>				thisform.omessage.warning('Parameters are missing for: '+ALLTRIM(m.jobnum))
>			endif
>		ENDIF
>		SELECT 'dieactualdata'
>		WAIT STR(m.itemnum)+'  '+STR(m.aol,8,5) window
>		GATHER memvar
>	ELSE
>		lcError=lcError+CHR(040)+ALLTRIM(diecmm.jobnum)+CHR(032)+ALLTRIM(STR(diecmm.itemnum))+CHR(041)+ CHR(032)
>	ENDIF
>	SELECT 'diecmm'
>ENDSCAN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform