Subject Jaybird 'object in use' error adding ref integrity constraint
Author Rashid Motala
Hello,

This problem is more subtle than we originally thought. I had asked
Simon to make a small test application which would show the problem.
When he did that, we found that there are some conditions under which
the script works, but we have not been clearly able to define the
conditions. So we have made two small test applications, one which
works, and one which fails and provided these with a sample database.
This is downloadable from (approx 1MB):

ftp://ftp.impro.net/temp/jberr.zip

We develop under Win2k and so the batch files to start the apps are
windows batch files. We last used Jaybird RC1a and Firebird 1.0 under
Windows. Requires JVM 1.4. The batch files assume that you have a 1.4
'java.exe' in your system path. The relevant source files are in the
same folders as the class files.

TEST.BAT is the one that fails. Run it first. TEST.BAT will always fail,
no matter how many times you run it.

TEST2.BAT is the one that works. After running TEST2, the constraint
will have been added, and the database will be useless for any further
testing. Restore it from the extra copy provided.

I hope somebody can find the pattern.

Regards,
Rashid.