Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Case statement within scan/endscan??
Message
 
 
À
15/05/2008 01:56:21
Chris Sund
Silhouette Solutions
Utah, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01317223
Message ID:
01317243
Vues:
11
No, UPDATE causes the SCAN to end because it moves record ponter to EOF. You can use REPLACE instead because you're already on the record you want to update
REPLACE xstep WITH STR(jstep,2,0)
*UPDATE treport1 SET xstep=STR(jstep,2,0) WHERE cprop_pk=oscan.cprop_pk
>I don't think I've tried this before, so maybe it doesn't work. I have 2 records in my cursor and when I try to scan through them the scan exits after the first record? Within the scan I have a case statement. Does the Case/Endcase break or exit out of the scan/endscan??
>
>
>
>SELECT SPACE(2) as xstep,* FROM tselect5 ;
WHERE BETWEEN(datetime,jfrom_date,jto_date)INTO CURSOR treport1 readwrite
>
>SCAN
>SCATTER NAME oscan
>
>WAIT WINDOW STR(RECNO())+' of '+STR(RECCOUNT()) &&& Used for testing purposes
>
>jstep=12
>
>DO CASE
>
>CASE EMPTY(oscan.nparcel_no) AND EMPTY(oscan.ccounty_fk)
>jstep=1
>CASE oscan.l1st_let_p<>.T.
>jstep=2
>CASE EMPTY(oscan.cphase1_attach1)
>jstep=3
>CASE EMPTY(oscan.ccphase2_attach1)
>jstep=4
>CASE EMPTY(oscan.cphase2_attach2)
>jstep=4
>CASE EMPTY(oscan.cphase2_attach3) and oscan.l1st_n_r<>.T.
>jstep=4
>CASE EMPTY(oscan.namount_owed)
>jstep=5
>CASE EMPTY(oscan.damount_as_of)
>jstep=5
>CASE EMPTY(oscan.cspoke_to) and oscan.lwww_lookup<>.T.
>jstep=5
>CASE oscan.l_rfa_printed<>.T.
>jstep=6	
>CASE EMPTY(oscan.dtax_sale_date)
>jstep=7
>CASE EMPTY(oscan.dcounty_struck_off_date)
>jstep=7
>CASE EMPTY(oscan.ddelinquent_tax_year)
>jstep=7
>CASE oscan.lrfa_recieved<>.t.
>jstep=7
>CASE oscan.lskip_title_search<>.T. and EMPTY(oscan.dtitle_search)
>jstep=8
>CASE oscan.l_ad_published<>.T. or oscan.l_tdmbi_printed<>.T.
>jstep=9
>CASE EMPTY(oscan.cphase3_attach1) or EMPTY(oscan.cphase3_attach2)
>jstep=10
>CASE oscan.l_proofofnotice_printed<>.T.
>jstep=11
>CASE oscan.l_request_for_deed<>.T. AND oscan.lredeemed<>.T.
>jstep=12
>CASE oscan.l_request_for_deed=.T.
>jstep=12
>ENDCASE
>	
>
>UPDATE treport1 SET xstep=STR(jstep,2,0) WHERE cprop_pk=oscan.cprop_pk
>
>ENDSCAN
>
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform