Yes, this should work fine. Internally, connections must remain open until the transaction is completed. Keep in mind that DTC may be required if multiple connections are used, even if they belong to the same database.
In addition, you do not indicate which database you are using, but there were errors in the MySQL implementation due to which this did not work. For MySQL, this has been fixed in MySQL 5.1.3 .
source share