home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 579a.lha / sqldb_v1.0alpha2 / rexx / sqltest.rexx next >
OS/2 REXX Batch file  |  1991-11-25  |  887b  |  31 lines

  1. /* sqltest.rexx */
  2. options results
  3. address 'SQLserver'
  4. say 'Got Server'
  5. 'ExecSQL' "open table test;"
  6. 'ExecSQL' "declare testcur cursor for select from test;"
  7. 'ExecSQL' "open testcur;"
  8. say 'About to fetch 1'
  9. 'ExecSQL' "fetch next of testcur;"
  10. say 'fetch_buf = ' result
  11. say 'sqlca.sqlcode = ' sqlca.sqlcode
  12. say 'About to fetch 2'
  13. 'ExecSQL' "fetch next of testcur;"
  14. say 'fetch_buf = ' result
  15. say 'sqlca.sqlcode = ' sqlca.sqlcode
  16. say 'About to fetch 3'
  17. 'ExecSQL' "fetch next of testcur;"
  18. say 'fetch_buf = ' result
  19. say 'sqlca.sqlcode = ' sqlca.sqlcode
  20. say 'About to fetch 4'
  21. 'ExecSQL' "fetch next of testcur;"
  22. say 'fetch_buf = ' result
  23. say 'sqlca.sqlcode = ' sqlca.sqlcode
  24. say 'About to fetch 5'
  25. 'ExecSQL' "fetch next of testcur;"
  26. say 'fetch_buf = ' result
  27. say 'sqlca.sqlcode = ' sqlca.sqlcode
  28. say 'sqlca.sqlerrmsg = ' sqlca.sqlerrmsg
  29. 'ExecSQL' "close testcur;"
  30. 'ExecSQL' "close table test;"
  31.