nPosValid physical number obtained through RecNo.
AdvPL GuideDBGoTo( nPos ) --> NilPositions by physical record number.
DBGoTo accepts a physical RecNo valid for the table, not a visual row or index-order position. Physical navigation can reach a record outside the filter; never use it as authorization enforcement. The example saves an existing position, moves to the logical top and returns to that number instead of assuming record 1 exists. DBSetFilter documents the distinction between logical navigation and DBGoTo. 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)
DBGoTo( nPos ) --> NilnPosValid physical number obtained through RecNo.
Nil; not a logical success indicator.
#Include "Protheus.ch"
User Function Ed333()
Local nRecord
If Select("EDTRB") > 0
If !EDTRB->(Eof())
nRecord := EDTRB->(RecNo())
EDTRB->(DBGoTop())
EDTRB->(DBGoTo(nRecord))
ConOut(cValToChar(EDTRB->(RecNo()) == nRecord))
EndIf
EndIf
Return NilTrue if the record stays valid during the fragment; no concurrent-change guarantee. 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.