Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan vs do while
Message
 
 
To
18/04/2007 11:57:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01217352
Message ID:
01217354
Views:
17
Tamas,

In the code bellow you're really doing something strange. Can you tell in English what was the whole idea of it?

Also don't use

replace table.field construct

always use replace field with value in Table1 because with the first one you may have some unpredictable results.

P.S. you can go back to the SQL to text thread and mark the helpful responses.

>Hi,
>I've bumped into an interesting thingy. I've used the code snippet below for a long time and it's worked quite well. But today my the MS XP crushed and had to restart the computer. From that time this code snippet stops at the end of the first loop. Interestingly enough, if I exchange the "scan... endscan" to "do while...enddo", it works fine.
>Any idea?
>
>
>SCAN
>	lEngkod = ALLTRIM(temp1.engkod)
>	lSql = STUFF(lcSelect,AT('"',lcSelect)+1,10,lEngkod)
>	&lSql
>	
>	SELECT temp2
>
>	lcTenSuly = 'temp1.ten_suly'
>	lcTenTav = 'temp1.ten_tav'
>
>	SELECT temp2
>   		FOR gnCount = 1 TO RECCOUNT()
>			lcTenSuly1 = lcTenSuly+ALLTRIM(STR(gnCount))
>			lcTenTav1 = lcTenTav+ALLTRIM(STR(gnCount))	
>			REPLACE &lcTenSuly1 WITH temp2.suly, &lcTenTav1 WITH temp2.Ttav
>			SKIP
>		ENDFOR
>
>ENDSCAN
>
>
>
>(Anyway, many thanks for the replies about the text wrapping problem from yesterday.)
>
>Tamas
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform