On Wed, 11 Mar 2009 15:10:00 +0100, marko wrote:
> I have one question.
...../....
> and than there will be just one statement to close ?
>
The most important thing to to sort out is what do you want to find in
the database if any one of a set of related statements fail and then
write your code to make that happen.
Generally you'll need to think about commitment units if more than one
update statement is involved because you need to ensure the database's
integrity no matter what hardware and software errors may occur. This
usually requires you to make each commitment point explicit. This has the
additional benefit of generally making recovery after an SQL failure much
simpler to implement.
Your example code doesn't mention commitment control, so I assume you are
using automatic commitment, i.e. each SQL statement commits as it
completes, but is that what you really intend it to do?
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
|