PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Data source in a loop
Data source (Example)
Data source in a loop
This example uses a data source in a loop: a unique name is created for each data source.
// Data Source variable
sdMyView is Data Source
// List of created views
sListOfViews is List of strings
// A view for each charset letter
FOR nLetterNum = 0 TO 25
// Unique name for the data source
sdMyView = "View" + DateSys() + TimeSys() + GetIdentifier()
// Stores the name in a list
Add(sListOfViews, sdMyView)
// Initialize the MyView variable
HCreateView(sdMyView, CUSTOMER, "*", "NAME,CITY", "NAME]='" + ...
Charact(Asc("A") + nLetterNum) + "'", hViewDefault)
END

// Processes on the 26 views


// Destroy the created views
FOR EACH sViewName OF sListOfViews
HDeleteView(sViewName)
END
DeleteAll(sListOfViews)
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment