Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot DROP VIEW or CREATE new one

Status
Not open for further replies.

tabilda

Programmer
Jul 1, 2003
2
0
0
GB
I have 2 problems, sorry!

The first is, I have created several views successfully but now get an error when i create this new one:

"unsuccessful metedata update STORE RDB$RELATION_FIELDS failed attemt to store duplicate value (visible to active transactions) in unique index 'RDB$INDEX_15! on line2...."
But i know the select statement works!!!

My second problem is dropping those views i have recreated as something else:

When i run
"DROP VIEW TRANSJOURNAL"
on a database I get the following error:
"unsuccessful metadata update
object TRANSJOURNAL is in use on line 1: drop view transjournal"

If I then try and drop a different table by using
"DROP VIEW TRANSJOURNAL2"
I get the following error:
"unsuccessful metadata update
object TRANSJOURNAL is in use on line 1: drop view transjournal2" - referring to the first view???!!!


I am new to Interbase so please help, thanks!!
Cheers, tabilda
 
It looks as though you are having problems with transactions. Remember that (almost) everything you do happens in the current transaction, until you either commit it to the database or rollback to undo your changes.
This is certainly causing your second problem. Just commit or rollback your transaction and you will then be able to drop the view.
It's difficult to know what's causing your first problem, but it looks as though you are trying to store a value in a column with a unique index on it, but that value already exists in that column in another row? The error message says the problem is on line 2, which obviously gives you a clue as to which part of the statement is causing the problem.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top