From: Logan Capaldo Date: 2006-09-29T06:09:00+09:00 Subject: Re: Commit when error On Thu, Sep 28, 2006 at 02:15:28AM +0900, Jose Montero wrote: > Well yes, i have detected when an error comes up. Sometimes its cause > the line contains malformed UTF-8 caracter, in other cases the length is > longer than the size of the field in the database,etc...And im > controlling all this cases, but what i want to do is that if appear an > unknown error, ok, dont process that line, continue and commit the rest > of already loaded lines. And what im trying to figure out is exactly > what u say: what is the state error the database is in, after the failed > query? How could i know this? If you every line but the line with the error to be commited, then well you need to commit each and every line. The purpose of a transaction is to do things atomically, not necessarily to do things in a batch. If one line is a an atomic transaction for you, then treat it as one. Using transactions to chunk your interactions with the DB doesn't make sense.