Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

ADD DBCOLUMN

ADD DBCOLUMN <oCol> TO DBBROWSE <oBrw> FIELD <cField> [HEADER <cHead>] [WIDTH <nWidth>]

Adds a column associated with a data field.

ADD DBCOLUMNAdvPL
01 · OVERVIEW

Overview

Historical eAdvpl reference, §3.20, p. 19. Syntax depends on that environment’s definitions; it does not establish compatibility with every current Protheus include. FIELD identifies a field in the DBBROWSE alias. Keep the workarea open while the component uses it. Unlike an array column, its source is a field; do not replace the field identifier with a numeric position. The example uses a read-only SA1 column. (Guia de referência eAdvpl, s.d., ref. 1)

02 · SYNTAX

Syntax

ADD DBCOLUMN <oCol> TO DBBROWSE <oBrw> FIELD <cField> [HEADER <cHead>] [WIDTH <nWidth>]

Parameters

oCol
ObjectRequired

Created column object.

oBrw
ObjectRequired

Existing DBBROWSE with valid alias.

cField
CharacterRequired

Field name.

cHead
CharacterOptional

Visible heading.

nWidth
NumericOptional

Environment-specific width.

Return value

No business return value is documented for this interface operation.

03 · PRACTICAL EXAMPLE

Commented example

// Historical fragment: oBrw uses an already open SA1.
Local oCol
ADD DBCOLUMN oCol TO DBBROWSE oBrw FIELD "A1_COD" ;
    HEADER "Code" WIDTH 12
// Does not enable editing or close the caller-owned alias.
Expected result

Proposes an A1_COD column. Alias, window and browse are prerequisites. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Verify field existence, branch scope and access rules. Displaying a field does not authorize changes.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Guia de referência eAdvpl. §3.20, p. 19. Referência histórica; autoria e compatibilidade atual não confirmadas. Accessed on 2026-10-25.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha