Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tableupdate() updates every row in remote table, s/b onl
Message
 
 
To
28/10/2002 09:36:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00716022
Message ID:
00716047
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform