DBCommit
DBCommit() --> NilFlushes pending updates in the current work area.
Overview
DBCommit flushes pending record updates in the current area and returns Nil. It is neither validation nor a universal replacement for END TRANSACTION. The reference notes that navigation operations can flush automatically. Avoid repeated loop calls without understanding cost and any outer transaction. EDTRB identifies only an owned test table already open with the required schema and permissions; examples are not intended for standard tables. (TOTVS, n.d., ref. 1)
Syntax
DBCommit() --> NilReturn value
Nil; not a logical success indicator.
Commented example
#Include "Protheus.ch"
User Function Ed326()
// Fragment: owned updates already validated in EDTRB.
If Select("EDTRB") > 0
EDTRB->(DBCommit())
EndIf
Return NilRequests flushing in the test context; Nil does not prove business success. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Check RDD, alias and pending operations. Navigation can flush updates; preserve context under the caller contract and handle errors in the complete routine.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.