Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tableupdate() updates every row in remote table, s/b onl
Message
 
 
À
28/10/2002 09:36:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00716022
Message ID:
00716047
Vues:
20
The first parameter in the TABLEUPDATE() has to be .F. or 0 to update just the current row.

>I am attempting only update one row, or conditionally update a row in a remote view. In the code below, EVERY single row of v_sorsdt_piktik gets updated with the LAST valued of nreserved and nbatchshipqty, that it was replaced with, on the last iteration through the loop.
>When I browse the data prior to the execution of this code, the data looks OK, when I browse it after the execution, it looks ok too, the right row or rows are updated. After the tableupdate though, every row is updated, even the rows that don't meet the criteria of the parameterized view. The view is requeried once before starting this code.
>
>Any ideas?
>
>

>**DSS on 7/29/02
>
>*** this code is in a scan loop
> if not empty(thisformset.efrmshipso.ekeypiktikgenno.text.value)
> replace sostrs.nreserved with sostrs.nreserved - Cursosptr.nshipqty in sostrs
> replace iciwhs.nreserved with iciwhs.nreserved - cursosptr.nshipqty in iciwhs
> *dss on 7/29/02
> lnResult=tableupdate(.t.,.t.,'iciwhs')
> If seek(Sostrs.cLineItem+padl(alltrim(thisformset.EfrmShipSO.ekeypiktikgenno.text.value),10,'0'), ;
> 'v_sorsdt_piktik','xlinepik')
> replace v_sorsdt_piktik.nreserved with v_sorsdt_piktik.nreserved - cursosptr.nshipqty in v_sorsdt_piktik
> replace v_sorsdt_piktik.nbatchshipqty with v_sorsdt_piktik.nbatchshipqty + ;
> cursosptr.nshipqty in v_sorsdt_piktik
> replace v_sorsdt_piktik.nadjreserved with v_sorsdt_piktik.nadjreserved - cursosptr.nshipqty in v_sorsdt_piktik
> else
> Messagebox('ERROR: can not find matching v_sorsdt_piktik record for ' + sostrs.clineitem)
> ENDIF
>
> endif
>

Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform