wwUtils::CursorToCollection

Easily creates a Collection from a FoxPro cursor. Creates either a FoxPro Collection or a wwCollection instance.

CursorToCollection(lcAlias,lnMode)

Return Value

a collection object or null on error

Parameters

lcAlias
Optional - The alias to convert. If not passed active alias is used

lnMode
Optional - 0* - Collection, 2 - wwCollection

Remarks

Web Connection internally uses wwCollection frequently and it offers more control and faster collection parsing. wwJsonSerializer also knows how to serialize wwCollection instances, but not FoxPro collections.

Example

*** Create a collection from Data
select * from Customers INTO CURSOR TQuery
loData = CursorToCollection("TQuery")

close data

*** Create cursor to receive the data
SELECT * FROM Customers where .F. ;
         INTO CURSOR TQuery READWRITE

*** Load data into a cursor from a collection
CollectionToCursor(loDataCollection,"Tquery")

See also:

Class wwUtils | Class wwCollection | wwUtils::CollectionToCursor

© West Wind Technologies, 1996-2019 • Updated: 05/30/18
Comment or report problem with topic