Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting records using REPLACE
Message
From
24/01/2000 04:50:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Deleting records using REPLACE
Miscellaneous
Thread ID:
00321564
Message ID:
00321564
Views:
59
The title says it all ; can I use REPLACE (some systemname) to delete records.

Why ?

I have a candidate index on a table. Records are deleted and added to it (wow !). When a record is deleted and later I want to add a record with the same index, the insert is refused because of the uniqueness constraint (as far as the table hasn't been packed since). So to prevent this, before I delete the record, I change a value in the record (using the negative recno() which can never give duplicates) :

REPLACE whatever_part_of_the_index WITH -recno()
DELETE NEXT 1

So twice access to the table : can I reduce the access to only once ?
Next
Reply
Map
View

Click here to load this message in the networking platform