Fix unbalanced TTS

  • April 13, 2009
  • 2 Comments

During development you may see one of these errors:unbalanced-tts-error

They are pritty anoying because set your Ax session in an unusable state that you can’t close properly. Normally you have to kill the ax32.exe in the Task Manager. Instead, open the AOT and run this job:

1
2
3
4
5
static void resetTTS(Args _args)
{
    while (appl.ttsLevel() > 0)
        ttsAbort;
}
  1. Klaas Deforche left a comment on April 13, 2009 at 10:29 pm

    This job is a life saver 🙂

  2. SebDra left a comment on January 22, 2011 at 12:54 am

    the call of ttsabort will abort all open transactions
    (the ttslevel is only a number, there is only one real open transaction)

    so you don’t need a while-loop, an if-statement is enough

    but what’s about the changes made in that transaction scope?

    i’ll prefer an job like this:

    while (appl.ttsLevel() > 0)
    ttscommit;

Comments are closed.