On Tue, 2005-05-04 at 07:52 -0700, Steve Roberts wrote:
> However, the underlying SQL itself will support transactions:
>
> query << "START TRANSACTION";
> query.execute();
> query.reset();
> query << // your update here
> query.execute();
> query.reset();
> query << "COMMIT"
> query.execute();
Thanks... I went with this method...
At first it seemed to work but when running my program through a full
test suite, I noticed that I got failed transactions.
One in particular has me stumped, it fails on a foreign key
constraint... the perculiar thing is that if I manually enter the same
queries through the command line, it works!
The only thing I notice that your example does that I don't is
query.reset() instead of creating a new query each time... could this be
significant?
Cheers,
-Tim