Updates a cursor from a collection by doing GATHER NAME MEMO for each member. An optional search expression can be provided for each item to allow updating existing records.
It's important to note that the result cursor or table has to exist and be open in order to accurately determine the data schema to import to.
*** Create a collection from Data select * from Customers INTO CURSOR TQuery loData = CursorToCollection("TQuery") close data *** IMPORTANT: Writable table/cursor has to exist SELECT * FROM Customers where .F. ; INTO CURSOR TImported READWRITE *** Load data into a cursor from a collection CollectionToCursor(loDataCollection,"TImported")
CollectionToCursor(loCollection, lcAlias, lcSearchExpression)
.T. or .F.
The collection of SCATTER NAME style objects to save.
Alias of the table to import to. If not passed ALIAS() is used.
An optional expression that allows comparing records to find matches to update. Example: "pk = item.pk"
The expression is evaluated using macro substitution. The collection item is available as 'item' (ie. item.pk, item.descript etc.)
The cursor that is to receive the data has to exist. If necessary create a cursor using
CREATE CURSORor by selecting an empty
SELECT READWRITEquery set.
See also:Class wwUtils | wwUtils::CursorToCollection
Comment or report problem with topic