IB won't delete my table! 
Author Message
 IB won't delete my table!

Another problem in the continuing saga of my metadata converter: now I
can't delete a table!  It even happens in WISQL.  I get the following
error in WISQL:

ISC ERROR MESSAGE:
unsuccessful metadata update
ERASE RDB$RELATIONS failed
cannot delete system tables

Except for the first line, this is the same error as I get at runtime in
my program.

As far as I can see, there is nothing that links to this table.  Certainly
nothing obvious like a foreign key; which in any case should generate a
different error from this one.  I'm using the BDE so there is only one
active transaction, and I explicitly started it right before setting up
the TQuery.SQL object with the text 'DROP TABLE AMMOS'.  There is no other
text in TQuery.SQL.  I get the error on TQuery.ExecSQL.

Have I tripped over an IB bug?

Help?
--
Esther Michaels
Please respond to newsgroup; I don't check my mail account



Wed, 15 Oct 2003 11:33:10 GMT  
 IB won't delete my table!


Quote:
> Another problem in the continuing saga of my metadata converter: now I
> can't delete a table!  It even happens in WISQL.  I get the following
> error in WISQL:

> ISC ERROR MESSAGE:
> unsuccessful metadata update
> ERASE RDB$RELATIONS failed
> cannot delete system tables

> Except for the first line, this is the same error as I get at runtime in
> my program.

> As far as I can see, there is nothing that links to this table.  Certainly
> nothing obvious like a foreign key; which in any case should generate a
> different error from this one.  I'm using the BDE so there is only one
> active transaction, and I explicitly started it right before setting up
> the TQuery.SQL object with the text 'DROP TABLE AMMOS'.  There is no other
> text in TQuery.SQL.  I get the error on TQuery.ExecSQL.

> Have I tripped over an IB bug?

Hi !

Just to explain the error message:

RDB$RELATIONS is, as you probably know, a system table holding record of all
tables. A DROP TABLE stmt leads to deleting a number of records in the RDB$
tables, RDB$RELATIONS is one of them.

There are a few oddities about IB metadata hanling:
- If you do more such operations with no delay inbetween, you may run into
trouble. Feel free to ask for more info, if this is the problem (that is:  it
works when done as a singular operation, fails when being operation no. 2 or
more). It's a thread/timing problem. Fix: Do a Disconnect / Connect between
every operation that may inflict with each other.
- I have twice experienced to have perfectly normal tables for some reason
reigstered as system tables. Then game is over for this db, actually, it's
not possible to drop it. I believe it's a field called something like
"SYSTEM_FLAG" in RDB$RELATIONS that controls this. Not editable, AFAIR.

I would advice you to check out this last one, as it could explain your error
message...

If you'd like, you could create a copy of your db, delete all contents and
e-mail it to me for a look.

--
Bjoerge Saether
Consultant / Developer
http://www.itte.no
Asker, Norway



Wed, 15 Oct 2003 19:53:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PrivateDir won't delete

2. Delphi 3 cant (won't?) DELETE records

3. Why Delete Procedure Won't Work?

4. Why Delete Procedure Won't Work?

5. I CAN'T DELETE A TABLE

6. Help with Paradox 5 table - Cascade Deletes don't seem to work

7. Detail Table Won't Insert New Record!?!?

8. Reportsmith won't print to fax on Win 95

9. Problem sharing table with BDE 5.1, Win 2000, and Win 98

10. Multiple apps using IB causing GPF's

11. 'Record/Key Deleted' Exception

12. D2: EDBEngineError: 'Record/key deleted'

 

 
Powered by phpBB® Forum Software