HELPLIB.HLB  —  RDML72  Statements  Request Handle, Examples  C Example
    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    DECLARE_VARIABLE name SAME AS PERS.EMPLOYEES.LAST_NAME;
    extern long RDB$RELEASE_REQUEST();
    RDML$HANDLE_TYPE REQ1;

    main()
    {
    REQ1 = 0;
    strcpy(name,"Gray");

    READY PERS;
    START_TRANSACTION READ_ONLY;

    FOR (REQUEST_HANDLE REQ1) E IN PERS.EMPLOYEES
         WITH E.LAST_NAME = name
         printf("%s\n",E.FIRST_NAME);
    END_FOR;

    if ((RDB$RELEASE_REQUEST(RDB$MESSAGE_VECTOR, &REQ1) & 1) == 0)
                             RDML$SIGNAL_ERROR(RDB$MESSAGE_VECTOR);

    COMMIT;
    FINISH;
    }
Close Help