Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Candidate index contain duplicate record
Message
From
04/02/2002 20:37:02
 
 
To
04/02/2002 10:57:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00614834
Message ID:
00615192
Views:
21
Hi Aritra

It would seem to me that you have two problems. The first is how the duplicate billno was generated. If you are generating it by incrementing a counter in an updateable record elsewhere, and that record is updated elsewhere, then you need to ensure that it can't be updated while a billno is being generated.

Given that you do generate a duplicate, and the index is candidate, the user normally gets a message about the duplicate, with the option to accept or revert the change. Unless the change is reverted, VFP quietly drops the index as candidate, and allows the duplicate, as it would on a regular index. However, it doesn't necessarily drop it in both the table and the dbc, hence the error in trying to rebuild. I have found it neccessary to use validate with recoverto drop the candidate index, reindex the table on that basis, detect the duplicate, remove or patch the offending value, and then restore the index tag as candidate in order to resolve this kind of issue.

HTH

Geoff

>
>I have developed a Billing System in VFP 6.0 which is installed in WIN'98 environment and network is Peer-to-Peer. The software is multiuser.
>
>The table is BILL.DBF which have two candidate index on field BILLNO and DOCKETNO.
>
>In the entry form, I have not included the table in DATAENVIRONMENT but open it with USE [table name] EXCLUSIVE command and after appending record I close it with USE command.
>
>But I have observed that more than one record with same BILLNO ( index on BILLNO is candidate). I don't understand why this is happening. Please suggest me some solution - How to get rid of this problem.
>
>Note: if I issue the reindex command, it generate an error of "INVALID DATABASE". Then I validate the database but after sometime it gives the same error.
>
>Thanks
>Aritra
Previous
Reply
Map
View

Click here to load this message in the networking platform