Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DO WHILE or SCAN Nesting Error
Message
From
31/08/2008 12:17:11
 
 
To
31/08/2008 10:54:32
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01343634
Message ID:
01343644
Views:
15
>UPDATE: Nevermind. Doh! I used ENDIF instead of ENDDO or ENDSCAN. Wonder if this is why people don't usually work on Sundays...

I am almost sure that you don't want to delete the records that are stored before 90 seconds :-)
But that is what you get when you subtract 90 from datetime.

>
>I've tried SCAN as well as the DO WHILE below, but I still get a nesting error on that line. The values are all valid. I've tried moving the parenthesis around, etc, but no good. This is in a testing PRG, so it is not being called from anywhere exept the command window. What is going on?
>
>CLOSE DATABASES
>CLOSE ALL
>CLEAR ALL
>RELEASE ALL
>CLEAR
>
>m_prom_dir = 'c:\fmsrun\prompt\'
>
>SET STEP ON
>
>			************************************************************************
>			* JJ - Eligibility Project
>			* Put code to delete/pack WorkList and WorkList_Detail tables here?
>			************************************************************************
>			IF !USED('WorkList')
>				USE (m_prom_dir) + 'WORKLIST' EXCLUSIVE IN 0
>			ENDIF
>
>			IF !USED('WorkList_Detail')
>				USE (m_prom_dir) + 'WORKLIST_DETAIL' EXCLUSIVE IN 0
>			ENDIF
>
>			SELECT WorkList
>			DO WHILE (WorkList.TransDt < (DATETIME() -90)) AND WorkList.Archive = .T.
>				SELECT WorkList_Detail
>				DELETE FOR WorkList_Detail.TransID = WorkList.TransID
>				SELECT WorkList
>				DELETE
>				SKIP
>			ENDIF
>
>			SELECT WorkList_Detail
>			PACK
>			USE IN WORKLIST_DETAIL
>
>			SELECT WorkList
>			PACK
>			USE IN WORKLIST
>			************************************************************************
>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform