wwXML::CursorToRS

This method converts the currently open cursor to an ADO recordset.

This method is method is more efficient than VFPCOMs CursorToRS method and is provided here mainly because it relies on an XML export and formatting to perform the appropriate conversions.

o.CursorToRS()

Return Value

Object - Recordset object or .NULL. Check for NULL for error checking.

Remarks

The recordset is created as a disconnected recordset so it is not connected to any datasource.

Example

USE TT_CUST
SET ORDER TO COMPANY

loXML = CREATE("wwXML")
loRS = loXML.CursorToRS()
IF ISNULL(loRS)
    RETURN
ENDIF

FOR x=1 to loRS.RecordCount
   ? loRS.Fields("company").value
   loRS.MoveNext
ENDFOR

See also:

Class wwXML (High Level Methods)

© West Wind Technologies, 1996-2018 • Updated: 04/22/00
Comment or report problem with topic