![]() | Programming Guide | ![]() |
Loads data from the active LDBs to the current screen
void sm_allget(int respect_flag);
respect_flag- Indicates whether to write to fields that already contain data:
0
Initialize all fields, regardless of their status.
1
Initialize only empty or unmodified fields.
sm_allgetcopies data from the active local data blocks to fields on the current screen with matching names. Panther calls this function automatically unless LDB processing is turned off through sm_dd_able.
sm_allgetoverwrites or respects existing data according to the value ofrespect_flag.sm_allgetleaves unchanged themdtproperty of the fields that it initializes.
#include <smdefs.h>
#include <smkeys.h>
/* If you open a window with sm_r_window and want named
* fields initialized from the LDB, where LDB processing
* is off, you need to call sm_allget. You might use
* this to make the active LDBs read-only for a certain
* transaction. */
sm_dd_able(0);
...
if (sm_r_window("popup", 5, 24) == 0)
{
sm_allget(0);
while (sm_input(IN_DATA) != EXIT)
{
...
}
sm_close_window();
}