Code:
SQL0752N Connecting to a database is not permitted within a logical
unit of work when the CONNECT type 1 setting is in use.
Explanation:
An attempt was made to connect to either another database or the same
database before issuing a COMMIT or ROLLBACK statement. The request
cannot be processed within a CONNECT type 1 environment.
User response:
* Submit a COMMIT or ROLLBACK statement before requesting a connection
to another database.
* If multiple databases need to be updated within a unit of work,
change the connection settings to SYNCPOINT TWOPHASE and CONNECT 2 by
re-precompiling or by issuing the SET CLIENT API from within the
application.
sqlcode: -752
sqlstate: 0A001
As the error stipulates, you are trying to connect to either the same database or a different one while you have an active unit of work. You need to issue COMMIT or ROLLBACK before connecting.
Andy