Program.SqlCursor.SqlQueryResultsByIndex Method

Returns an object from the SqlCursor result set by index.

Syntax

BegFunc SqlCursor.SqlQueryResultsByIndex Access(*Public) Type(Object)
        DclSrParm index Type (*Integer)      

Parameters

index
A reference to an instance of a row in the query results set.

Returns

SqlCursor object referred to by the index.

Example

Assumes SqlCursor SelF1CSR already declared and opened.

0337.00   C/EXEC SQL
0338.00   C+ SqlQueryResultsByIndex NEXT FROM SelF1CSR
0339.00   C+ INTO :F1DATE, :F1ORD#, :F1SEQ#, F1EMP#, :F1WFGR, :F1DIST
0340.00   C/END-EXEC

The following migrated code is generated for just the statement above:

If (SelF1CSR.SqlQueryResultsByIndex(ASNA.Monarch.PRogram.SqlCursor.SqlQueryResultsByIndexOrientations.Next) )
    F1DATE = SelF1CSR.SqlQueryResultsByIndex(0) *AsFld F1DATE
    F1ORD# = SelF1CSR.SqlQueryResultsByIndex(1) *AsFld F1ORD#
    F1SEQ# = SelF1CSR.SqlQueryResultsByIndex(2) *AsFld F1SEQ#
    F1EMP# = SelF1CSR.SqlQueryResultsByIndex(3) *AsFld F1EMP#
    F1WFGR = SelF1CSR.SqlQueryResultsByIndex(4) *AsFld F1WFGR
    F1DIST = SelF1CSR.SqlQueryResultsByIndex(5) *AsFld F1DIST
EndIf

Requirements

Namespace: ASNA.Monarch
Assembly: ASNA.VisualRPG.Runtime.DLL
Platforms: Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows 7, Windows 8 Pro, Windows 10 Pro