home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / misc / sqldb.lzh / sqldb / rexxmacros / sqltest5.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1992-08-26  |  649 b   |  29 lines

  1. /* sqltest5.rexx */
  2. address 'SQLserver'
  3. options results
  4. 'ExecSQL' 'open table footab;'
  5. 'ExecSQL' 'declare testcur cursor for select from footab;'
  6. 'ExecSQL' 'open testcur;'
  7. 'ExecSQL' 'fetch columns of testcur;'
  8. /*trace(results)*/
  9. say 'result = ' result
  10. 'GetLastCode'
  11. say 'sqlcode = ' result
  12. do forever
  13.    if result > 0
  14.     then say 'greater than zero'
  15.    if result = 0
  16.     then say 'equal to zero'
  17.    if result < 0
  18.     then say 'less than zero'
  19.    if result ~= 0
  20.        then break
  21.    'ExecSQL' 'fetch next of testcur;'
  22.    say 'result = ' result
  23.    'GetLastCode'
  24.    say 'sqlca.sqlcode = ' result
  25. end
  26. 'ExecSQL' 'close testcur;'
  27. 'ExecSQL' 'close table footab;'
  28.  
  29.