GetCursorValues Method
Description
Get the values for a single field for a number of rows in the specified cursor.
Syntax
Visual Basic |
---|
Public Function GetCursorValues( _ ByVal cursor As String, _ ByVal nField As Long, _ ByVal nDelta As Long, _ ByVal separator As String, _ ByVal nullValue As String _ ) As String |
Parameters
- cursor
- The name of the cursor we are interrogating.
- nField
- the index number of the field we are interrogating, the index starts at 0.
- nDelta
- The number of rows, relative to the current row, for which values are to be returned. Enter 0 to include all rows from the current row to the end of the cursor.
- separator
- The character string to be placed as a separator between the fields’ values returned.
- nullValue
- The value to be written to the returned string for any field which is null, i.e. contains no value.
Return Type
The field’s values as a separator-separated string.
Remarks
GetCursorValues retrieves values by going from the current row to the start or end in steps of nDelta.
This means GetCursorValues changes the current row.
The returned string will contain nDelta values or less if there are less left in the cursor.
You can use 0 for the nDelta parameter to include all rows from the current row to the end of the cursor.
Available: GEO D OD OM SISpy
Group:
Example
sis.OpenOverlayCursor("MyCursor", 3, "_area#" & vbTab & "UPRN&" & vbTab & "BDRMS&", False)
For i As Integer = 0 To 2
Debug.WriteLine (GisGetCursorValues("MyCursor", 1, 10, ",", "NULL"))
Next
This code outputs the second field in MyCursor in comma-separated groups of ten
substituting "NULL" for items where UPRN$ has no value.
24,11,32,1234567890,2,30,19,1,51,36
25,26,27,28,29,55,NULL,NULL,NULL,13
31,33,9,22,23