Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Candidate key
Message
From
04/04/2011 17:22:08
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problem with Candidate key
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01506055
Message ID:
01506055
Views:
144
Hi,

I have a table, MSAMedicalServices, that has the following fields:
SER_ClinicFK I
SER_Invoice I Caption "Invoice"
SER_lVoid L

And a CANDIDATE key, CLINICINV, defined as follows:
Expression: BINTOC(SER_CLINICFK)+BINTOC(SER_INVOICE)
Filter: .NOT.DELETED().AND..NOT.SER_LVOID

This works fine, at the clinic installation as i can have multiple invoice entries for a clinic that are voided, but only 1 non-voided invoice for the clinic.

No problem.


I have an Export/Import scheme, however, that updates this table at Headquarters, and here is the problem.

The Import inserts the new entries into a view, v_MSAMedicalServices, and when the Tableupdate() is called for v_MSAMedicalServices, i get the error:

Uniqueness of index CLINICINV is violated

I'm trying to figure out how to handle this...any input is appreciated. Thanks, Jill
Next
Reply
Map
View

Click here to load this message in the networking platform