Skip to Content
0
Former Member
Jan 17, 2005 at 05:30 PM

StartTransaction and EndTransaction

998 Views

I need to import a XML file, with Journal Entries, several times in a month.

The file has about 100 Journal Entries and, for example, if the 80th, gives an error, after that, the process stops and has to "rollback" the others 79.

First of All, when importing I begin the transaction:

oCompany.StartTransaction()

....

'After add the lines

oJournalEntries.Lines.Add

...

'After fill the header, add the entry

oJournalEntries.Add

...

The problem is that after we .Add(), it commits the transaction and we cannot rollback.

Could someone help how can I do that? Or How can we use the oCompany.StartTransaction()

Ribeiro Santos