Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update field
Message
From
04/08/2006 17:49:08
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01143071
Message ID:
01143107
Views:
11
>>>Try this
>>>
CREATE TABLE Table1 (Id Int,Field1 C(30))
>>>INSERT INTO Table1 VALUES(5 ,"555555555555")
>>>INSERT INTO Table1 VALUES(3 ,"333333333333")
>>>INSERT INTO Table1 VALUES(2 ,"222222222222")
>>>INSERT INTO Table1 VALUES(10,"101010101010")
>>>INSERT INTO Table1 VALUES(5 ,"double555555")
>>>BROWSE NORMAL
>>>select * from table1 into cursor _tmp READWRITE
>>>
>>>GO TOP
>>>LOCATE FOR ID = 3
>>>REPLACE Field1 WITH "update333"
>>>
>>>GO TOP
>>>LOCATE FOR ID = 5
>>>REPLACE Field1 WITH "update555"
>>>
>>>UPDATE Table1 SET table1.field1 = _tmp.field1 FROM _tmp WHERE table1.id = _tmp.id
>>>
>>>SELECT Table1
>>>BROWSE NORMAL
>>>HTH
>>
>>Yes.. and in your example ID = 3 .. stay as is "333333333333" and not updated with "update333".. it was exactly my quesstion
>
>Denis,
>look at second browse
>My result is:
> 5 update555
> 3 update333
> 2 222222222222
> 10 101010101010
> 5 update555

>
>This result is with VFP9 SP1.

Maybe you will laugh.. but my result is
5 update555
3 333333333333
2 222222222222
10 101010101010
5 update555

I use VFP8 SP2 ! but.. I don't think it must be a problem for such expressions! :-[ ]]

Denis
Previous
Reply
Map
View

Click here to load this message in the networking platform