Subject drop table not works , with create/insert and drop table , single connection
Author karthick srini
Dear Members ,

I face some issue when executing dropping tables
along with create/insert/ in single connection.
.
Before let me group the steps I have did
Group one :
Create Table say 'Employer'
Create Table say 'Employee' having FK with
Employer
commit the transaction;

Group two:
insert entries in to Table Employer &
Employee
commit the transaction;

Group three :
drop table Employer;
drop table Employee;
commit the transaction;

I got the single connection from DriverManager. Did
one ,two ,three in sequence. While committing the
third group steps (dropping table), I got below
exception

org.firebirdsql.jdbc.FBSQLException: Resource
Exception. unsuccessful metadata update
object EMPLOYEE is in use
Reason: unsuccessful metadata update
object EMPLOYEE is in use
at
org.firebirdsql.jdbc.AbstractConnection.commit(AbstractConnection.java:365)
at
org.firebirdsql.jdbc.FBConnection.commit(FBConnection.java:52)
at DropTest.main(DropTest.java:61)
at org.firebirdsql.gds.GDSException: unsuccessful
metadata update
object EMPLOYEE is in use
at
org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1756)
at
org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1709)
at
org.firebirdsql.jgds.GDS_Impl.isc_commit_transaction(GDS_Impl.java:586)
at
org.firebirdsql.jca.FBManagedConnectionFactory.commit(FBManagedConnectionFactory.java:681)
at
org.firebirdsql.jca.FBManagedConnection.internalCommit(FBManagedConnection.java:391)
at
org.firebirdsql.jca.FBLocalTransaction.internalCommit(FBLocalTransaction.java:149)
at
org.firebirdsql.jdbc.AbstractConnection.commit(AbstractConnection.java:362)
at
org.firebirdsql.jdbc.FBConnection.commit(FBConnection.java:52)
at DropTest.main(DropTest.java:61)

But when I executed same steps in isql.exe tool of
firebird issue don't has happened. So I hope it may
due to Jaybird driver. Herewith I have attached the
testprogram (DropTest.java) which created the issue.

Issue don't has happenned when i closed connection and
obtained a new connection after each commit. Herewith
I have attached the test program depicting
this(DropTest2.java).
When I perform Group one and three (excluing two)
there is no issue.

On the whole drop table does not work , in
create/insert and drop table sequence in single
connection irrepective whether auto commit true or
false.

Any help will be appreciated,

thanks & Regards,
S.Karthick



__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

[Non-text portions of this message have been removed]