Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this SCAN ...ENDSCAN correct?
Message
From
28/01/2004 20:23:38
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00871624
Message ID:
00871635
Views:
13
>Henry,
>
>What this code suppouse to acomplish?
>
Hi Sergey:

How are you? Basically, each time i run an update, this prg file should update the ClitList.CurUpdate field to the day the update was run. The ClientList.LastUpdate, would be updated to reflect the previous date that was stored in CurUpdate field.


>>Hi all:
>>
>>The following code is not accomplishing what I wanted it to.
>>
>>
&& Pull data from ClientList.dbf into a cursor
>>SELECT * from ClientList INTO cursor curClientList nofilter
>>GO top
>>
>>&& Set the value of this variable
>>mLastUpdate = curClientList.CurUpdate
>>
>>&&Update the fields for each record in the table
>>mCurUpdate = DATE()
>>
>>select ClientList
>>
>>SCAN
>>	IF mLastUpdate = {}
>>		mLastUpdate = DATE()
>>		INSERT INTO ClientList (LastUpdate);
>>   			VALUES (mLastUpdate)
>>   	ENDIF
>>ENDSCAN
>>
>>select ClientList
>>
>>SCAN
>>   	IF curClientList.CurUpdate = {}
>>   		INSERT INTO ClientList (CurUpdate);
>>   			VALUES (mCurUpdate)
>>   	ELSE
>>   		UPDATE ClientList
>>   			SET ClientList.LastUpdate = mLastUpdate;
>>   				ClientList.CurUpdate = mCurUpdate
>>   ENDIF
>>ENDSCAN
>>
>>This code appears to be starting from empty records. Where am I going wrong? Thank you for your assistance.
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform