Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this SCAN ...ENDSCAN correct?
Message
De
28/01/2004 20:23:38
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00871624
Message ID:
00871635
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform