Subject | RE: [firebird-support] Re: unsuccessful metadata update object is in use |
---|---|
Author | K.V.Suresh |
Post date | 2004-04-29T04:46:54Z |
Dear Alan,
In fact, my whole experiement is to understand the
behavior when multiple "open" connections exist with
the same DB. This whole thread is giving me more and
more clarity into this problem.
Thanks for your reply anyways.
Thanks,
Suresh.K.V.
--- Alan McDonald <alan@...> wrote: > >
String createSQL1 = "CREATE TABLE T1 (ID INTEGER
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
In fact, my whole experiement is to understand the
behavior when multiple "open" connections exist with
the same DB. This whole thread is giving me more and
more clarity into this problem.
Thanks for your reply anyways.
Thanks,
Suresh.K.V.
--- Alan McDonald <alan@...> wrote: > >
String createSQL1 = "CREATE TABLE T1 (ID INTEGER
> NOT____________________________________________________________
> > NULL PRIMARY KEY)";
> > String createSQL = "CREATE TABLE T2 (ID INTEGER
> NOT
> > NULL, FOREIGN KEY(ID) REFERENCES T1(ID) ON DELETE
> > CASCADE)";
> >
> > Connection conn =
> DriverManager.getConnection(...);
> > conn.setAutoCommit(false);
> >
> > Connection conn1 =
> DriverManager.getConnection(..);
> > conn1.setAutoCommit(false);
> >
> > conn.createStatement().executeUpdate(createSQL1);
> > conn.commit();
> > conn.createStatement().executeUpdate(createSQL);
> > conn.commit();
> >
> > It throws exception on the second commit(). So, I
> > suppose, the problem still exists even after the
> > explicit "commit" is being done.
>
> You've created 2 connection but used only one - this
> may be a typo but in
> any case - try disconnecting the first connection
> before establishing the
> second and executing the statement.
> Alan
>
>
>
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html