cIndexExisting index name compatible with table/RDD.
AdvPL GuideDBSetIndex( cIndex ) --> NilOpens an existing index without creating keys.
DBSetIndex adds the specified index orders to those already open. Existing orders mean the new order is not automatically assumed active; without orders, the first new order takes control. It does not create the file and is not DBCreateIndex. ED_NEWIDX is only a pre-existing owned index compatible with example EDTRB, not a standard product index. 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)
DBSetIndex( cIndex ) --> NilcIndexExisting index name compatible with table/RDD.
Nil; not a logical success indicator.
#Include "Protheus.ch"
User Function Ed338()
// Requires existing ED_NEWIDX; neither creates nor replaces it.
If Select("EDTRB") > 0
EDTRB->(DBSetIndex("ED_NEWIDX"))
EndIf
Return NilRequests index opening; does not claim it became active when other orders existed. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.