DBClearIndex
DBClearIndex() --> NilCloses indexes in the current work area.
Overview
DBClearIndex closes the area’s indexes and flushes pending updates according to the reference. It deletes no table and is not rollback. Subsequent indexed lookup requires reopening and selecting an appropriate order; do not assume the old order remains active. 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
DBClearIndex() --> NilReturn value
Nil; not a logical success indicator.
Commented example
#Include "Protheus.ch"
User Function Ed324()
// Only within the test table index context.
If Select("EDTRB") > 0
EDTRB->(DBClearIndex())
EndIf
Return NilIndexes closed on the test table; pending operations may be flushed. 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.