HELPLIB.HLB  —  RDML72  Statements  DATABASE  Examples
    The following programs demonstrate how to specify a COMPILETIME
    and RUNTIME database as the same database. Because a RUNTIME
    database is not explicitly declared, the programs use the
    COMPILETIME database at runtime also.

1  –  C Example

    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    main ()
    {
    READY PERS;
    START_TRANSACTION READ_ONLY;

    /* perform some action on the database */

    COMMIT;
    FINISH;
    }

2  –  Pascal Example

    program db (input,output);
    DATABASE PERS = FILENAME 'PERSONNEL';

    begin
    READY PERS;
    START_TRANSACTION READ_ONLY;

    (* perform some actions on the database *)

    COMMIT;
    FINISH;
    end.
Close Help