Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add new record
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00171529
Message ID:
00171530
Views:
19
>Happy new year to all....
>I can't add a new record into my table. It says "Primary key uniqueness violated" How comes the problem?

You've defined a primary or candidate index for your table - the value for the field or fields must be unique among all records. If you're getting this error when doing an APPEND BLANK, there's probably already a record in there with the primary key value of an empty record.

Rather than using APPEND BLANK directly into the table, use INSERT, making certain to specify a unique value for the primary key field. If you're using parametized views with buffering, you can APPEND BLANK into a view and then populate the record; you still must make certain that the primary key value assigned to the record is unique before doing a TABLEUPDATE()
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform