Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Constraint Name? |
Wed, Oct 30 2019 12:39 AM | Permanent Link |
Ian Branch | Hi Team,
The good book says.. "EDB_ERROR_CONSTRAINT - The constraint <ConstrainName> has been violated (<ErrorMessage>)This error is raised when a constraint that has been defined for a table is violated. This includes primary key, unique key, foreign key, and check constraints. The specific error message is indicated within the parentheses." How can/do I pick out the ConstrainName please? Hmm. Should it actually be ConstraintName? Regards & TIA, Ian |
Fri, Nov 8 2019 10:06 AM | Permanent Link |
Adam Brett Orixa Systems | Ian,
>>How can/do I pick out the ConstrainName please? Hmm. Should it actually be ConstraintName? When a Constraint is defined in a table, you give it a name. This name is reported when the error occurs. And yes there is a typo in the Help file! ie CREATE TABLE "MyTable" ( "ID" INTEGER DEFAULT UID() NOT NULL, "DateDone" DATE DEFAULT Current_Date NOT NULL, "Name" VARCHAR(250), "StatusID" INTEGER, "InitialMemo" CLOB COLLATE "ANSI" NOT NULL, "ResponseMemo" CLOB COLLATE "ANSI", "DateCreated" TIMESTAMP DEFAULT Current_TimeStamp, CONSTRAINT "PrimaryKey" PRIMARY KEY ("ID"), CONSTRAINT "StatusID" FOREIGN KEY ("StatusID") REFERENCES "Status" ("ID") ) In the above table, if there was a Constraint error the name reported would either be "StatusID" or "PrimaryKey". Adam |
Fri, Nov 8 2019 4:10 PM | Permanent Link |
Ian Branch | Thanks Adam. I shall have a play.
Ian |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |