Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted records
Message
From
01/12/1996 17:27:07
 
 
To
01/12/1996 16:45:47
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00013889
Message ID:
00013894
Views:
28
>I deleted a record in a Visual FoxPro table and now I'm inserting another record with the same fields of the primary key of the deleted record.
> The database engine don't alow this insert since we are duplicating the primary key.
> Someone knows how to do this insert and how to avoid this problem with others deleted records?

If this is really the primary key then you shouldn't use a key which is already in the table, after all, this is what primary keys are used for.

What Dave told you is also good because you should have a mecanism of assigning primary key like using a TABLE.DBF to act as a data dictionary which can then be used to know the next value of the primary key and for the locking mecanism.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform