Subject Re: Cannot create tables in new FB 2.5 DB, fails with error 335544351 on commit
Author peterbelow@ymail.com
--- In firebird-support@yahoogroups.com, "Woody" <woody-tmw@...> wrote:
> Nice to see you giving FB a go. The syntax is a little off for Firebird
> when creating primary key constraints. Try something like this:
>
> CREATE TABLE HL_Oids(
> OID OidKey NOT NULL CONSTRAINT OID_Key PRIMARY KEY
> );

Thanks, Woody. These subtle syntax differences between SQL servers are a major pain in the butt <g>. I'm more familiar with Oracle.

Anyway, your suggestion does not resolve the problem.

OidKey is a domain:

CREATE DOMAIN OidKey AS CHAR(22);

Forgot to include that, sorry. If I try to create the table with

CREATE TABLE HL_Oids (
OID OidKey NOT NULL CONSTRAINT PK_OIDs PRIMARY KEY
);

this is again accepted without errors (I would expect invalid syntax to fail at this stage already) but fails on the subsequent commit with

*** IBPP::SQLException ***
Context: Transaction::Commit

SQL Message : -607
This operation is not defined for system tables.

Engine Code : 335544351
Engine Message :
unsuccessful metadata update
cannot create index PK_OIDS

If I replace the OidKey type with CHAR(22) in the CREATE TABLE statement nothing changes, this still fails with the same error on commit.

So i'm still stuck...

--
Peter