CallbackStruct
from one group of an SaCallbackStruct
callback structure.
#include "SaPopCalls.h"
SaCallbackStruct* SaMakeCbsByGroup(SaCallbackStruct *cbs, int group);
SaCallbackStruct
callback structure. A group is defined by the results of a single SQL SELECT statements execution. Sybase Data Objects allow multiple SELECT statements in a single Data Object, resulting in multiple groups of data.
SaMakeCbsByGroup
returns a malloc'd SaCallbackStruct given a callback structure. The group parameter specifies which group in cbs
is used to make the return SaCallbackStruct. If cbs
is NULL or an invalid group specification is used, a NULL pointer is returned. Use SaFreeCbs() to deallocate this memory when it is no longer needed. The returned structure should be considered read-only data. Also, the actual data values in the structure should only be used while the underlying data is valid. This is usually after the Population callback function returns, although it may extend beyond that if the data is cached and not overwritten.
#include "SaConsoleCalls.h"
void SaPopulateFields(list, client_data, cbs)
Widget list;
XtPointer client_data;
SaCallbackStruct *cbs;
{
SaCallbackStruct *pcbs;
pcbs = SaMakeCbsStartStopCol(cbs, 0, 5);
SaPopulateTextFieldByCol(UxGetWidget(textField3),0,pcbs);
SaPopulateTextFieldByCol(UxGetWidget(textField4),1,pcbs);
SaPopulateTextFieldByCol(UxGetWidget(textField6),2,pcbs);
SaPopulateTextFieldByCol(UxGetWidget(textField5),3,pcbs);
SaPopulateTextFieldByCol(UxGetWidget(textField8),4,pcbs);
SaPopulateTextFieldByCol(UxGetWidget(textField7),5,pcbs);
SaFreeCbs(pcbs);
pcbs = SaMakeCbsByCol(cbs, 2);
SaPopulateTitleAndIcon(UxGetWidget(topLevelShell1),
NULL,pcbs);
SaFreeCbs(pcbs);
pcbs = SaMakeCbsByGroup(cbs, 0);
SaPopulateList(UxGetWidget(scrolledList1), NULL,
pcbs);
SaFreeCbs(pcbs);
pcbs = SaMakeCbsStartColRange(cbs, 6, 1);
SaPopulateTextField(UxGetWidget(textField7),
NULL,pcbs);
SaFreeCbs(pcbs);
}