1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Progress 4GL: Buffer handle attribute for all fields

Discussão em 'StackOverflow' iniciado por fdantas, Maio 7, 2015.

  1. fdantas

    fdantas Administrator Moderador

    I am fairly new to Progress and even newer to handles so apologies if I have missed anything obvious, I've looked online but am yet to find what I'm looking for.

    I am running a dynamic query similar to the below, in this example after then query is run, the "age" field of the corrresponding record is displayed on screen, I understand how this is done from the buffer-field attribute-method, but my question is how do I display the entire record, is there an equivalent attribute method, or have I misunderstood something crucial?. Thank you for your time. :

    def var tbl as character no-undo.
    def var fld as character no-undo.
    def var qh as handle no-undo.
    def var bh as handle no-undo.
    def var fh as handle no-undo.

    assign tbl = "customer".
    assign fld = "age".
    create buffer bh for table tbl.
    create query qh.
    qh:set-buffers( bh ).
    qh:query-prepare( "for each " + tbl + " where name = 'tom'" ).
    qh:query-open.

    do transaction:
    qh:get-first( no-lock ).
    fh = bh:buffer-field( fld ).
    display fh:buffer-value.
    end.

    delete object bh.
    delete object qh

    Continue reading...

Compartilhe esta Página