Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Strange bug when creating Constraints
Thu, Sep 26 2013 7:47 AMPermanent Link

Adam Brett

Orixa Systems

I have the following simple bit of script:

EXECUTE IMMEDIATE
' ALTER TABLE "TrainingItems" ADD CONSTRAINT "StatusID"
 FOREIGN KEY ("StatusID") REFERENCES "Status" ("ID")';

There is a table called "status", the StatusID field is just used to log things like "Planned", "In Process", "Completed" etc.

TrainingItems is a newly created, empty table.

I have run this piece of script and received the error:

ElevateDB Error #401 An error occurred with the statement at line 4 and column 19 (The constraint 4159 does not exist in the table TrainingItems)

... OK so the Constraint creation failed for no apparent reason, that is not so serious, although I don't know why it has happened (especially when TrainingItems is an empty table!)

However the much worse thing is that now any action on the Status table returns the error:

ElevateDB Error #401 The constraint 4159 does not exist in the table TrainingItems

i.e. running

SELECT * FROM Status, attempting to open the Status table, or access it in a select with another table generates the above error.

If the table Trainingitems is DROPPED from the schema, I think receive the error

ElevateDB Error #401 The table 4141 does not exist in the schema Default

when I run "SELECT * FROM Status".

--

I am quite confused by these errors. Does anyone know why they are happening.

I am using EDB V2.11
Mon, Sep 30 2013 2:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< I am using EDB V2.11 >>

This has been fixed:

http://www.elevatesoft.com/incident?action=viewrep&category=edb&release=2.12&incident=3822

Tim Young
Elevate Software
www.elevatesoft.com
Image