Transaction API question

Christian Stimming stimming at tuhh.de
Tue Feb 10 15:18:15 EST 2009


Am Dienstag, 10. Februar 2009 11:02 schrieb Alan Jenkins:
> >> I have a question about how to destroy a transaction properly. 
>
> Interesting.  The generic import layer does this:
>
> xaccTransDestroy(trans);
> xaccTransCommitEdit(trans);
>
> to destroy an open transaction in gnc_import_exists_online_id().  It
> seems to work :-).  Maybe the register code is missing the commit.

I really don't know now, and I also didn't really know at the time when I 
wrote (part of) the importing code. I vaguely recall this Destroy/Commit 
sequence had to be used there because otherwise the transactions didn't 
disappear as intended. However, even at that time I couldn't find out which 
one was the intended way, and it was sufficient for me to see this work.

Regards,

Christian


More information about the gnucash-devel mailing list