DDL cannot be completed on this table because it is referenced by constraint <name> on table <name>.

  • Thread starter Thread starter Jürgen Germonpré
  • Start date Start date
J

Jürgen Germonpré

Dear All,

I've executed this query via ADODB:

CREATE TABLE Trevors (trevor_name VARCHAR(15) NOT NULL UNIQUE, trevor_type
VARCHAR(5) NOT NULL, CHECK (trevor_type IN ('Mail', 'Depot')), UNIQUE
(trevor_type, trevor_name));

As I want to delete the table i'm getting this 'unexpected error'.

I've deleted indexes, but this doesn't help a bit.

Does anybody has a clue?

Thanks.
 
CREATE TABLE Trevors (trevor_name VARCHAR(15) NOT NULL UNIQUE, trevor_type
VARCHAR(5) NOT NULL, CHECK (trevor_type IN ('Mail', 'Depot')), UNIQUE
(trevor_type, trevor_name));

This worked for me in Access 2003. I just copied the name of
the constraint shown in the warning window when I tried to
delete the table and used the constraint name in the Alter
Table below. Then I deleted the table. Maybe try doing the
same.

With CurrentProject.AccessConnection
.Execute "ALTER TABLE Trevors DROP CONSTRAINT check_830AEDB2
_00F5_45C7"
End With
 
Thank you for your info.

I've posted (sorry,sorry) the same question in another article
<[email protected]> as follow up of a conversation
already started.
And got +- the same info at +- the same time.
 
Back
Top