Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 1 of 1 total |
Foreign Key question |
Wed, Mar 17 2021 8:39 PM | Permanent Link |
Greg Hallam Microcalm Solutions Inc | I have a EDB database with a table called InvoiceMaster. It has a Foreign Key constraint on the field StoreID to another table called Stores via is PrimaryKey. The On Update setting is No Action and the Delete setting is Restrict. When I add a new record to the InvoiceMaster table it tries to do a lock on the Stores table for the record of the specified StoreID. If it cannot get a lock on the Stores table record I get an error
ElevateDB Error #1005 The foreign key constraint StoreKey for the table InvoiceMaster has been violated (Cannot lock the matching primary or unique key 1 in the table Stores) Is there anyway to shut off this check? I realize that to be 100% certain the lock needs to be applied to stop the PrimaryKey in Stores to be changed during the InvoiceMaster append operation, but I would like to use the Delete check without changing some of the Pessimistic Locking being used in my application. If I was to use Cached Updates in the Stores table update, would that be an alternative?? The Stores table is rarely edited but may hold a lock for a minute or two while the edit is happening. |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |