Subject Re: [firebird-support] Re: statement failed, SQLCODE = -607
Author Helen Borrie
At 09:24 PM 3/08/2004 +0000, you wrote:
>--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
>wrote:
> > At 03:14 PM 3/08/2004 +0000, you wrote:
> > >I try to create a simple view using isql:
> > >
> > >CREATE VIEW VW_CUSTOMERS
> > >AS
> > >
> > > SELECT
> > > "other_oid",
> > > "name",
> > > "remarks",
> > > "code",
> > > "VAT_No"
> > > FROM
> > > "t_others"
> > > WHERE
> > > "is_customer" = 1;
> > >
> > >and I get:
> > >
> > >statement failed, SQLCODE = -607
> > >unsuccesfull metadata update
> > >
> > >
> > >what do I do wrong?
> >
> > Try the query out in dsql to see what error caused the metadata
>update to fail.
> >
> > /heLen
>
>OK helen,
>
>I declare myself a complete novice and as such I am not sure I can
>follow you. I am using Delphi, so I tried to use a TIBSQL component
>to execute the same statement. I got the same error as above, no more
>details. I also tried EMS Interbase/Firebird Manager and got 'This
>operation is not defined for system tables, unsuccessful metadata update.'

What I meant was - try the SELECT query, that you are using to define the
view, in a query interface (such as EMS Manager). Meaning - submit the
SELECT statement as a regular query to find out what's wrong with the
statement.

That said, the error message you report seems cryptic, and messages
referring to the system tables usually indicate that you have a bad mix of
components and configuration.

-- Are you sure you don't have any mismatched components around? (client,
server, message file)
-- Are you sure this is a dialect 3 database? (Quoted identifiers aren't
supported for a dialect 1 database...)
-- If it's a dialect 3 database, are you running EMS Manager as a dialect 3
client?

Tip: to find out what dialect the database is, open the database in the
isql utility and use the command SHOW SQL DIALECT; That will tell you the
dialect of both the client connection and the database.

If it's Windows, open a command shell, cd to the \bin directory of the
Firebird installation and do this:

isql drive:\full\path\to\yourdatabasefile.fdb -user sysdba -password whatever

You will get a message describing the connection and a prompt like this:
SQL>

There are more details about using isql in the Quick Start Guide (click
through from the main Firebird site page to download it)

/heLen