RDOHELP72.HLB  —  START_STREAM, Undeclared  Example
    The following example creates a record stream in a BASIC program
    using Callable RDO:

        RDMS_STATUS = RDB$INTERPRET ('INVOKE DATABASE PATHNAME ' + &
                                      '"PERSONNEL"')

        RDMS_STATUS = RDB$INTERPRET ('START_STREAM EMP USING ' +   &
                                      'E IN EMPLOYEES')

        RDMS_STATUS = RDB$INTERPRET ('FETCH EMP')

        DML_STRING = 'GET ' +                             &
                           '!VAL = E.EMPLOYEE_ID;' +      &
                           '!VAL = E.LAST_NAME;' +        &
                           '!VAL = E.FIRST_NAME' +        &
                     'END_GET'

        RDMS_STATUS = RDB$INTERPRET (DML_STRING, EMP_ID,  &
                                      LST_NAM, FRST_NAM)

    This BASIC program fragment shows how to display three field
    values from the EMPLOYEES relation in a Callable RDO program:

    o  The first three calls to RDB$INTERPRET invoke the database,
       start a stream called EMP, and move the pointer to the first
       record in the stream.

    o  The assignment statement builds a command string to perform
       the GET operation.

    o  The final call sends the command string to Oracle Rdb, which
       assigns the database field values from the first record in the
       stream to the program's host variables.
Close Help