Subject Re: [Firebird-Java] unsuccessful metadata update
Author Luca Lafranchi
Hi :) Try doing a commit after each table definition: I think that the
third statement fails because it there's a a foreign key on
"Tmeta_tipos" and the table is still "in use" since transaction is not
committed.

Ciao
Luca

luisfelipehurtado wrote:
> Hi everyone!
>
> I have a Java method that reads a SQL plain file and sends the
> sentences to Firebird.... at moment only CREATE TABLE is supported...
>
> I'm getting the following error:
>
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. unsuccessful
> metadata update
>
> object TMETA_TIPOS is in use
>
> when the method sends the following sentence:
>
> CREATE TABLE Ttipos (
> tip_id SMALLINT NOT NULL,
> tip_nombre VARCHAR(50) NOT NULL,
> mtip_id SMALLINT NOT NULL,
> FOREIGN KEY (mtip_id) REFERENCES Tmeta_tipos(mtip_id),
> PRIMARY KEY (tip_id)
> );
>
> Before that sentence the following two sentences has been executed in
> a correct way...
>
> CREATE TABLE Tvarsys (
> var_nombre VARCHAR(50) NOT NULL,
> var_valor VARCHAR(200) NOT NULL,
> PRIMARY KEY (var_nombre)
> );
>
> CREATE TABLE Tmeta_tipos (
> mtip_id SMALLINT NOT NULL,
> mtip_nombre VARCHAR(20) NOT NULL,
> PRIMARY KEY (mtip_id)
> );
>
> What happens?
>
> Thanks! And sorry about my poor english...
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>