home *** CD-ROM | disk | FTP | other *** search
- /* sqltest5.rexx */
- address 'SQLserver'
- options results
- 'ExecSQL' 'open table footab;'
- 'ExecSQL' 'declare testcur cursor for select from footab;'
- 'ExecSQL' 'open testcur;'
- 'ExecSQL' 'fetch columns of testcur;'
- /*trace(results)*/
- say 'result = ' result
- 'GetLastCode'
- say 'sqlcode = ' result
- do forever
- if result > 0
- then say 'greater than zero'
- if result = 0
- then say 'equal to zero'
- if result < 0
- then say 'less than zero'
- if result ~= 0
- then break
- 'ExecSQL' 'fetch next of testcur;'
- say 'result = ' result
- 'GetLastCode'
- say 'sqlca.sqlcode = ' result
- end
- 'ExecSQL' 'close testcur;'
- 'ExecSQL' 'close table footab;'
-
-