Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : FRAME-DB function
 

FRAME-DB function

Returns the logical database name of the database that contains any field in which the user-interface cursor is entered.
Note: Does not apply to SpeedScript programming.

Syntax

FRAME-DB
The function requires no arguments. If the cursor is in a field that is not a database field, this function returns no value for the field.

Example

For each field being updated, this procedure displays the field name, the table the field belongs to, and the database in which the table exists. The EDITING phrase is part of the UPDATE statement; it displays information on the field as you update the record, and then reads each of the keystrokes entered (READKEY) and applies those keystrokes (APPLY LASTKEY).
r-frdb.p
FOR EACH Customer NO-LOCK:
  UPDATE Customer.CustNum Customer.Name Customer.Address Customer.Address2
    Customer.City Customer.State Customer.PostalCode
    WITH 1 DOWN 1 COLUMN CENTERED EDITING:
    DISPLAY "You are editing field: " FRAME-FIELD SKIP
      " of file: " FRAME-FILE SKIP
      " in database: " FRAME-DB
      WITH FRAME a ROW 15 NO-LABELS CENTERED.
    READKEY.
    APPLY LASTKEY.
  END. /* EDITING */
END.

Notes

*If the cursor is not in an enabled input field when the last input statement is executed, or the input field is not associated with a database field, FRAME-DB returns an empty string.
*Use this syntax to find the name of a schema holder for a non-OpenEdge database:
SDBNAME ( FRAME-DB )

See also

DBCODEPAGE function, DBCOLLATION function, FRAME-FIELD function, FRAME-FILE function, FRAME-INDEX function, LDBNAME function, PROGRAM-NAME function, SDBNAME function