# DBExecute custom commit fails

**URL:** <https://forum.cloverdx.com/t/dbexecute-custom-commit-fails/504>\
**Category:** CloverDX Platform\
**Created:** [April 16, 2009, 12:00am UTC](https://forum.cloverdx.com/t/dbexecute-custom-commit-fails/504 "2009-04-16T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fig0r](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@fig0r](https://forum.cloverdx.com/u/fig0r)\
**Post date:** [April 16, 2009, 12:00am UTC](https://forum.cloverdx.com/t/dbexecute-custom-commit-fails/504/1 "2009-04-16T00:00:00Z")

</div>

Hi,

my graph consists of 2 phases. In phase 1 I use a DataReader to read records from a CSV file and write them to a database by using the DBOutputTable component. But I only want to commit the data if no error occurs. So I set the error action of the DBOutputTable to rollback and the records in commit to MAX\_INT. In the second phase I use a DBExecute that just executes a commit. Unfortunately this does not work. Even if both phases passed without any errors there were no records committed. Any ideas how to solve this?  
database is postgreSQL 8.3, I have to use the DBOutputTable component, PostgreSQLDataWriter is no alternative.

---

<div class="post-metadata">

**Author:** ![avackova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@avackova](https://forum.cloverdx.com/u/avackova)\
**Post date:** [April 17, 2009, 7:56am UTC](https://forum.cloverdx.com/t/dbexecute-custom-commit-fails/504/2 "2009-04-17T07:56:04Z")

</div>

Hello,  
you have to set attribute threadSafeConnection=“false” in your connection. In other case you call _commit_ on different connection instance (while each component creates its own instance of db connection - see [DB Connection](http://wiki.clovergui.net/doku.php?id=graph%5Felements:connections#dbconnection)).
