home *** CD-ROM | disk | FTP | other *** search
- /* sqltest.rexx */
- options results
- address 'SQLserver'
- say 'Got Server'
- 'ExecSQL' "open table footab;"
- 'ExecSQL' "declare testcur cursor for select from footab;"
- 'ExecSQL' "open testcur;"
-
- say 'About to fetch 1'
- 'ExecSQL' "fetch next of testcur;"
- say 'fetch_buf = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
-
- say 'About to fetch 2'
- 'ExecSQL' "fetch next of testcur;"
- say 'fetch_buf = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
-
- say 'About to fetch 3'
- 'ExecSQL' "fetch next of testcur;"
- say 'fetch_buf = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
-
- say 'About to fetch 4'
- 'ExecSQL' "fetch next of testcur;"
- say 'fetch_buf = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
-
- say 'About to fetch 5'
- 'ExecSQL' "fetch next of testcur;"
- say 'fetch_buf = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
-
- say 'About to fetch absolute 7'
- 'ExecSQL' "fetch absolute 7 of testcur;"
- say 'fetch_buf = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
- 'GetLastErrMsg'
- say 'errmsg = ' result
-
- 'ExecSQL' "close testcur;"
- 'ExecSQL' "close table footab;"
-
-