Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Enable/Disable a constraint? |
Mon, Mar 9 2020 6:06 PM | Permanent Link |
Ian Branch | Hi Team,
Can I enable/disable a table constraint at run time? If so, how pls? Regards & TIA, Ian |
Tue, Mar 10 2020 2:59 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
Not as far as I know. You can enable/disable triggers though if that's any help. I did have one sneaky thought but I'm not sure how I could get it to work - it will depend on the constraint. Can you post it here please. Roy Lambert |
Tue, Mar 10 2020 4:50 AM | Permanent Link |
Ian Branch | Hi Roy,
Her you go. I have others but if one can work then I should be able to make it work on the others. {sql} ALTER TABLE "Models" ADD CONSTRAINT "ModelsDupCheck" UNIQUE ("Manufacturer","MODEL","ModelNo") ERROR CODE 10007 MESSAGE ''Data Entry Error! The Manufacturer, Model and Model Number combination is already present in the Models table!'' {sql} Regards, Ian |
Tue, Mar 10 2020 5:17 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
My sneaky idea won't even get off the ground - a UNIQUE constraint is basically doing an index lookup - no way to fudge that. There is a flag for EMPTY TABLE (IGNORE CONSTRAINTS) so something might be doable - you'll have to ask Tim for the feature. Roy Lambert |
Tue, Mar 10 2020 5:36 AM | Permanent Link |
Ian Branch | Cheers & Tks for looking.
|
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |