Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot add a record
Message
From
22/07/1999 00:09:05
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00244414
Message ID:
00244547
Views:
15
Hi Gerard,

As Ed said, don't leave the key as zero. I am reminded of the old joke, "Doctor, it hurts when I do this"..."So don't do that!".

Do not add via browse unless you have an INSERT trigger to gen a unique numeric value as a key. For programmatic appends, use INSERT INTO and always specify a value for the key.

>I've just created a Database with a few tables, all with numeric primary keys:
>I go in , browse a table, seelct option to add a record, and leave primary key as zero.
>I then try to add another record...it wont let me saying 'Uniqueness of index XXXXXX violated.
>I reckon the system is trying to assign a primary key of 0, but is there a way around this ?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform