Help about Navision Transaction Language

arbifis
arbifis Member Posts: 5
Hello everybody,

I have one question:

¿Has Navision a Transaction Language? ](*,)


I think C/AL is Transaction Language, becasuse i can begin a operation with de Data Base, insert, update, delete some thing and i can make commit or no.

¿Is true?
¿Is this explanation correct?
¿Any one has any other explanation?


Thanks everybody.

Comments

  • kriki
    kriki Member, Moderator Posts: 9,124
    Navision starts automatically a transaction on the first write in the DB. And the transaction only ends when you put a COMMIT or at the end of the processing (meaning the GUI is free again for the user to do something). So a transaction doesn't end at the exit of a function or object like many think.
    With a Navision-DB, you can't read uncommited data.

    With SQL it is possible. The only way to avoid it is to put this in your code:
    CURRENTTRANSACTIONTYPE := TRANSACTIONTYPE::Update; (for updating) or
    CURRENTTRANSACTIONTYPE := TRANSACTIONTYPE::Snapshot; (for Read only)
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • dsatria
    dsatria Member Posts: 80
    kriki wrote:
    ... or at the end of the processing (meaning the GUI is free again for the user to do something).

    How does Navision know when "GUI is free" ?
    When, for instance, invoice posting is in progress, we can click Cancel to abort the process...does it mean that whatever has written to database has been commited ?
  • Phenno
    Phenno Member Posts: 630
    dsatria wrote:
    kriki wrote:
    ... or at the end of the processing (meaning the GUI is free again for the user to do something).

    How does Navision know when "GUI is free" ?
    When, for instance, invoice posting is in progress, we can click Cancel to abort the process...does it mean that whatever has written to database has been commited ?


    there is a small error subsystem. which means, either there is an error in transaction or not. if you cancel something, you practically send an error flag end your transaction is rolled back. if form/codeunit ends with job without error, your transaction is commited unless there is an explicit commit command used.
  • kriki
    kriki Member, Moderator Posts: 9,124
    Phenno wrote:
    dsatria wrote:
    kriki wrote:
    ... or at the end of the processing (meaning the GUI is free again for the user to do something).

    How does Navision know when "GUI is free" ?
    When, for instance, invoice posting is in progress, we can click Cancel to abort the process...does it mean that whatever has written to database has been commited ?


    there is a small error subsystem. which means, either there is an error in transaction or not. if you cancel something, you practically send an error flag end your transaction is rolled back. if form/codeunit ends with job without error, your transaction is commited unless there is an explicit commit command used.
    Correct!
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • dsatria
    dsatria Member Posts: 80
    kriki wrote:
    there is a small error subsystem. which means, either there is an error in transaction or not. if you cancel something, you practically send an error flag end your transaction is rolled back. if form/codeunit ends with job without error, your transaction is commited unless there is an explicit commit command used.

    Now it's clear to me! :D
    Thanks a lot, kriki!
  • kriki
    kriki Member, Moderator Posts: 9,124
    dsatria wrote:
    kriki wrote:
    there is a small error subsystem. which means, either there is an error in transaction or not. if you cancel something, you practically send an error flag end your transaction is rolled back. if form/codeunit ends with job without error, your transaction is commited unless there is an explicit commit command used.

    Now it's clear to me! :D
    Thanks a lot, kriki!
    Actually you have to thank Phenno. He has written this.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Phenno
    Phenno Member Posts: 630
    kriki wrote:
    Actually you have to thank Phenno. He has written this.


    ;)