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

  1. /*
  2.  *
  3.  * Script name:     GetFieldName.rexx
  4.  * Author:          Franz Hemmer
  5.  * Purpose:         Demonstrate how to get the name of field in 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 dir = "" | file = "" THEN DO
  18.    SAY 'Usage: GetFieldName <number>'
  19.    EXIT 5
  20. END
  21.  
  22.  
  23. /*----------------------------------------------*/
  24. /* Address InterBase port, and execute command. */
  25. /*----------------------------------------------*/
  26. ADDRESS INTERBASE1 GET_FIELD_NAME number
  27. IF rc > 0 THEN
  28.    DO
  29.       SAY INTERBASE.LASTERROR
  30.    END
  31. ELSE
  32.    DO
  33.       SAY result
  34.    END
  35. ENDIF
  36.