Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the different between UPDATE and REPLACE?
Message
From
07/04/1998 21:45:08
 
 
To
07/04/1998 13:37:24
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00090092
Message ID:
00090325
Views:
22
>you are wrong:
>
>The replace command uses record locking in the same manner as the update - SQL command when you're replacing just one record. The main difference is that if you use these commands to replace more than one record the update uses multple record lock and the replace command uses a file lock. The replace command blocks more records at a time and the lock last longer than the separate record locks of the update command. The update command garantees a higher degree of concurrency, but is slower than the replace command because it has to lock each record before it is updated.
>
>For best performance: use replace
>For best concurrency in a multiuser environment: use Update - SQL
>
>I think the main reason for including the update command is that it is a ANSI SQL command. (See the differenct between the DELETE and the DELETE - SQL command)

Thanks. Currently, I set all buffer mode to 5 (Os. Table Buffering) so that
I can Revert more than one record if really set wrong and allow user to read
the same record.

So, I use 'Replace' in all coding when need, even add a blank record to detail
table and replace the Key at once with Master Key!

One interest thing is: Replace can be use in WorkArea. So, I don't concern the
statement will be fail as not real.
Update only use for Real Table!

I use Update when I do some importing task and in command window.
Now, I wonder that I should also use Replace in command window!
(Reason: Speed)



how about if using buffer mode 3 (Os. Row), Seem File lock is contractic with
Row buffering!
Does Replace got strange behaviour?!

Try to treat command as Human :)
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform