home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Database / INTERBASE2_0-2.DMS / in.adf / ARexx / GetRecord.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-03-24  |  750 b   |  35 lines

  1. /*
  2.  *
  3.  * Script name:     GetRecord.rexx
  4.  * Author:          Franz Hemmer
  5.  * Purpose:         Demonstrate how to get a record from the current table in InterBase.
  6.  * Related Program: InterBase Pro
  7.  * Written:         23.03.93
  8.  *
  9.  */
  10.  
  11. Options Results
  12. parse arg number
  13.  
  14. /*-----------------------------------*/
  15. /* Check that parameters was passed: */
  16. /*-----------------------------------*/
  17. IF number = "" THEN DO
  18.    SAY 'Usage: GetRecord <number>'
  19.    EXIT 5
  20. END
  21.  
  22. /*----------------------------------------------*/
  23. /* Address InterBase port, and execute command. */
  24. /*----------------------------------------------*/
  25. ADDRESS INTERBASE1 GET_RECORD number
  26. IF rc > 0 THEN
  27.    DO
  28.       SAY INTERBASE.LASTERROR
  29.    END
  30. ELSE
  31.    DO
  32.       SAY result
  33.    END
  34. ENDIF
  35.