Difference between revisions of "FINDCURSOR()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Data Connectivity
 
 
 
 
==Purpose==
 
==Purpose==
 
Returns the workarea number corresponding to the specified gateway cursor
 
Returns the workarea number corresponding to the specified gateway cursor
Line 12: Line 8:
  
 
==See Also==
 
==See Also==
[[CLOSE]], [[CURSORNAME()]], [[DECLARE CURSOR]], [[DROP CURSOR]], [[FETCH]], [[GATEWAY()]], [[OPEN CURSOR]]
+
[[CLOSE]], [[CURSORNAME()]], [[DECLARE CURSOR]], [[DROP CURSOR]], [[FETCH]], [[GATEWAY()]], [[OPEN]]
  
  
 
==Description==
 
==Description==
 
The FINDCURSOR() function returns a workarea number corresponding to the open gateway cursor specified by <expC>.   
 
The FINDCURSOR() function returns a workarea number corresponding to the open gateway cursor specified by <expC>.   
 +
 
If the cursor name specified is not open, or no gateway is active, then a value of -1 is returned.
 
If the cursor name specified is not open, or no gateway is active, then a value of -1 is returned.
  
Line 24: Line 21:
 
select 3
 
select 3
 
set gateway to "ora@sales:scott/tiger"
 
set gateway to "ora@sales:scott/tiger"
exec sql
+
declare employees;
declare employees cursor for
+
  cursor for;
select empno, ename, job
+
  select empno, ename, job;
from emp
+
  from emp;
order by deptno;
+
  order by deptno
exec sql
+
open employees
open employees;
+
  
 
? findcursor(cursorname())
 
? findcursor(cursorname())
Line 38: Line 34:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:SQL]]
 
[[Category:SQL]]
 +
[[Category:Remote Data Connectivity]]
 +
[[Category:Remote Data Connectivity Functions]]

Latest revision as of 11:50, 22 June 2010

Purpose

Returns the workarea number corresponding to the specified gateway cursor


Syntax

FINDCURSOR(<expC>)


See Also

CLOSE, CURSORNAME(), DECLARE CURSOR, DROP CURSOR, FETCH, GATEWAY(), OPEN


Description

The FINDCURSOR() function returns a workarea number corresponding to the open gateway cursor specified by <expC>.

If the cursor name specified is not open, or no gateway is active, then a value of -1 is returned.


Example

select 3
set gateway to "ora@sales:scott/tiger"
declare employees;
  cursor for;
  select empno, ename, job;
  from emp;
  order by deptno
open employees
 
? findcursor(cursorname())
         3


Products

Recital Server, Recital