Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ignoring deleted records in a SEEK
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00345465
Message ID:
00345482
Views:
19
>Greetings all!
>
>Here's a fun little problem I just ran upon. My program is setup to look up a serial number specified by the user and see if it's in the database. In my code one of the first things I've done is "SET DELETED ON" so that deleted records are SUPPOSED to be ignored. Here's the fun part:) Over time alot of new records have been added, and deleted. Well now we're at the point where 2 records have the same serial #, however, one record is deleted, the other is not and is correct and up-to-date. So when I do a SEEK on the serial #s, shouldn't it ignore the deleted record and find the good one? Currently, the good record is below(in the index) the deleted record, and I guess that's why the SEEK returns EOF with no records found....is this right? Any thoughts? Please reply if you need further clarification on this. Thanks in advance for any help you can give:)
>
>John

Two thoughts (all I'm capable of in a day):

1. Your index has become corrupt. I use Stonefield Database Toolkit for my reindexing.

2. Maybe you are using a form's private data session, and SET DELETED is scoped to the data session. In other words, SET DELETED ON in your main programs isn't enough. You have to SET DELETED ON for each form. This is typcially done in the class's Load() method.
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform