One way it to make a user connection. I have for the example used custTable;
Put this code in a methot and calle it withhin the tts. This wil keep the changes made to custTable, but skip all other changes incase of a ttsabort;
Best regards
Erik
void setInUserConnection()
{
CustTable custTable;
connection serConnection = new userConnection();
;
userConnection.ttsbegin();
custTable.setConnection(userConnection);
// do your stuf
custTable.updaet();
}
// calling the method
ttsbegin;
while select forupdate table1
{
this.setInUserConnection();
}
ttscommit;
________________________________
Fra: development-axapta@yahoogroups.com på vegne af Zappia Alessandro
Sendt: ma 20-02-2006 20:05
Til: development-axapta@yahoogroups.com; Axapta-Knowledge-Village@Yahoogroups.com
Emne: [development-axapta] Forced commit
Hi all!
I know that this may sound as an odd request, but I'm looking for some
trick to force a commit in a nested transaction. The idea is to keep the
log of occurred actions in a specific table during an invoice posting
routine, to track successful events and failures.
I wrote a method that I call to log a specific event (a sort of
"checkpoint"), but If the whole process fail and a global abort occurs,
all the records that I wrote in the table are rolled back, and this is
not what I meant...
So, I'd like to "force" a commit (as if it were outside the transaction
scope...) on my log table.
Anyone has got ideas?Is my intention too wicked?
Thank you very much!
[Non-text portions of this message have been removed]
Yahoo! Groups Links
[Non-text portions of this message have been removed]
SPONSORED LINKS
Computer part | Programming languages | Microsoft axapta |
Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.