Although the concept of committing an update is the same whether you are using
C/AL code or C/FRONT, there are some minor differences. This topic explains these differences in detail.
C/FRONT is the toolkit that allows you to develop applications, in the C programming language, while accessing a C/SIDE database.
Commit in C/AL and C
When you want to perform an update using C/FRONT, the first
thing you must do is to tell the system explicitly that you want to
perform a write transaction (use
BeginWriteTransaction.) Likewise you must use
explicitly tell the system when your write transaction ends.
When you use C/AL code to update a C/SIDE database, these
EndWriteTransaction statements are handled implicitly
by the system. That is, these commands are executed automatically
before and after the C/AL code is executed. This means that if you
only need to perform a single write transaction you do not have to
commit your update explicitly; it is done automatically. If,
however, you need to perform more than one write transaction, you
have to use
COMMIT()to separate the transactions.
The C/AL code contains two write transactions. When the C/AL
code starts to execute, the write transactions are automatically
enabled. By issuing the
COMMIT() command, you tell the
system that the first write transaction has ended, and you prepare
the system for the second. As the execution of the C/AL code is
completed, the second write transaction ends automatically. When
you use C code to perform the same transactions, each transaction
must be explicitly encapsulated within the