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.
Const.PM_DataSourcePopulate
Applications and the framework send the Const.PM_DataSourcePopulate to a data source to fetch data from the database.
Name | Description |
---|---|
nWhat = wParam | Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute, Const.METHOD_GetType |
nControlFlag = lParam | Flag indicating how the data source should be populated. Specify 0 for normal behavior. Specify Const.POPULATE_NoConfirm to populate without asking the user to save any changes. Specify Const.POPULATE_UseQueryDialog invoke the query dialog and let the user specify a query condition before populating. Specify Const.POPULATE_Single to populate only the data source receiving the message, ignoring any child data sources. |
When nWhat = Const.METHOD_Inquire, the return value is TRUE if the data source may be populated in the way specified by nControlFlag, FALSE otherwise.
When nWhat = Const.METHOD_Execute, the return value is TRUE if data source was successfully populated, FALSE otherwise.
This example uses the Const.PM_DataSourcePopulate message to refresh the data shown in a data source.
Function: Refresh Actions ! Make sure we use the same where and order by statement as the last populate. Call DataSourceUserWhere( METHOD_Execute, SalHStringToNumber( DataSourceUserWhereGet( ) ) Call DataSourceUserOrderBy( METHOD_Execute, SalHStringToNumber( DataSourceUserOrderBtGet( ) ) ! Repopulate this data source only. Call SalSendMsg( i_hWndSelf, PM_DataSourcePopulate, METHOD_Execute, POPULATE_Single )Sal.SendMsg(i_hWndSelf, Const.PM_DataSourceUserWhere, Const.METHOD_Execute, lsWhereStmt.ToHandle()); Sal.PostMsg(i_hWndSelf, Const.PM_DataSourcePopulate, Const.METHOD_Execute, Const.POPULATE_UseQueryDialog);