Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Minor Bug in v2.11 b1 when dropping a table column that references itself
Sat, Nov 17 2012 5:27 PMPermanent Link

Barry

In table MyTable I have a column called CompanyId that is a GUID and its default is set to:

Default:
IFNULL(CompanyId,fcn_GetActiveCompanyId(),CompanyId);

Basically this default value will update CompanyId with the active company id (set in another table) when the MyTable row is added. (Yes, I could have used a trigger for this, but I wanted this value defined prior to the post event in Delphi).

If I later decide to use EDBMgr to drop the column CompanyId from table MyTable, it complains CompanyId is referenced by CompanyId. Smile

Here is the error message:
ElevateDb Error #201 The column CompanyId in the table MyTable cannot be dropped because it is still referenced by the column CompanyId in the table MyTable.

So when dropping an object like a column, EDB should ignore any references that point to itself. I haven't tried this will v2.11 b2. I also don't know if this same effect exists in other objects like tables or views.

Barry
Wed, Jan 2 2013 5:41 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Barry,

<< So when dropping an object like a column, EDB should ignore any
references that point to itself. I haven't tried this will v2.11 b2. I also
don't know if this same effect exists in other objects like tables or views.
>>

I'll check this out, thanks.

Tim Young
Elevate Software
www.elevatesoft.com
Image