DataSourcePopulate

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalNumber DataSourcePopulate( SalNumber nWhat, SalNumber nParam )

Applications and the framework call the DataSourcePopulate method to populate a top-level window.

Parameters

Name Description
SalNumber nWhat Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute, Const.METHOD_GetType.
SalNumber nParam Options for the populate. Specify 0 for normal populate, Const.POPULATE_Single - populate the data items only (ignoring record selectioncombo boxes), Const.POPULATE_UseQueryDialog - will launch a query dialog for the user before the populate, Const.POPULATE_NoConfirm - if the population should be performed by ignoring changes or Const.POPULATE_KeepFocus - Used to populate for instance a child table and forcing the focus to stay in calling field.

Returns

When nWhat = Const.METHOD_Inquire: the return value is true if all the views used by the data source are available and (in the case of a query) there are any queryable data items in the data source. Otherwise the return value is false.

When nWhat = Const.METHOD_Execute: the return value is true if the data source is populated successfully, false otherwise.

When nWhat = Const.METHOD_GetType, the return value is Const.CHILDTYPE_SourceMethod.

Comments

The DataSourcePopulate is the start of the populate process. It will check with the user to save any changes, optionally invoke the query dialog, and then call function DataSourcePopulateIt to perform the actual populate.

Calling DataSourcePopulate will also populate all child data sources.

DataSourcePopulate is called automatically by the framework when a data source receives the Const.PM_DataSourcePopulate message.