Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread weird #201: can not drop table
Tue, Feb 22 2011 9:50 AMPermanent Link

Lucian

Hi,

I am trying to drop a table and get some 201 error, saying "ElevateDB Error #201 The table xxx in the schema Default cannot be dropped because it is still referenced by the constraint PKey in the table users"

Please fix the following issues:

1. What I understand from the message is that the table users has a constraint PKey referencing the table I want to drop - which is false, the constraint PKey in table users is a primary key, it does not reference anything but its own column(s).

2. The table (xxx) which I want to drop has indeed a foreign key referencing the table users, but its name doesn't appear in the error message.

3. If indeed you can not drop a table that has constraints foreign keys I believe its a bug. You should be able to drop a table in any circumstances, unless the table you want to drop is referenced by foreign keys of other tables (which is not the case I am experiencing, the table xxx was a new test table not referenced by any other table).


Thanks,
Lucian
Tue, Feb 22 2011 11:55 AMPermanent Link

Lucian

>3. If indeed you can not drop a table that has constraints foreign keys I believe its a bug.

Okay I got from the help file that it is not a bug. But than isn't this a deviation from the SQL 2003? It should be marked as "deviation" in the help file.

If it is a deviation from the standard I'd rather think of it as a bug which should be fixed in the engine, so I won't have to fight with it Smile

Thanks,
Lucian
Wed, Feb 23 2011 3:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Lucian,

<< I am trying to drop a table and get some 201 error, saying "ElevateDB
Error #201 The table xxx in the schema Default cannot be dropped because it
is still referenced by the constraint PKey in the table users" >>

This will be fixed in the next build - I'm revamping some of the
dependencies now, including removing this "source constraint" dependency
between primary keys and foreign keys.  I'm also adding proper dependencies
between views and the tables/functions that they reference.

--
Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 12 2011 12:55 PMPermanent Link

David Izada R

De Novo Software

Thanks, Tim, the current behavior is really unexpected and force us to drop the constraint before attempting to drop the table. It is the first time I see this among several database engines.

David Izada R
De Novo Software
Wed, May 18 2011 5:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< Thanks, Tim, the current behavior is really unexpected and force us to
drop the constraint before attempting to drop the table. It is the first
time I see this among several database engines. >>

Yes, it's fixed now in the latest builds.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image