#include "WorkingDialog.h"
void SgeSetAdHocFlag(pSgeWorkCallData p);
p
pSgeWorkCallData
structure.
SgeSetAdHocFlag
sets the ad hoc for an allocated pSgeWorkCallData
structure. If p
is NULL, no action is taken. In ad hoc mode Sapphire/Web will allow dynamic binding of returned column data. This is accomplished by using other column bindings that may have been set as prototypes for the dynamic column bindings.
/*** generic ad hoc code ***/
/*** Server name is in textField1 ***/
/*** Database name is in textField2 ***/
/*** All columns of data will end up in scrolledList1 ***/
/*** Statement to execute is in scrolledText1 ***/
pSgeWorkCallData pSgeWCD;
char *db, *server;
db = strdup(SaGetText(UxGetWidget(textField2)));
server = strdup(SaGetText(UxGetWidget(textField1)));
pSgeWCD = getSgeWorkCallData(UxWidget,
-1,
server,
db,
"D_AUTHORS_INFO", NO_WP);
free(db);
free(server);
SgeSetCallDetail(pSgeWCD, TO_CACHE,
(XtPointer)0x0,
WIDGET_INDEX, UxGetWidget(scrolledList1),
(XtPointer)0x0,
NO_QUEUE_FILE);
SgeSetColBind(pSgeWCD, UxGetWidget(scrolledList1), 1, 0,
0,
(XtPointer)0x0,
(XtPointer)0x0);
SgeSetAdHocFlag(pSgeWCD);
SgeVaSetFrags(pSgeWCD,
SaGetText(UxGetWidget(scrolledText1)),
NULL);
DoWorkProc(pSgeWCD, PROCESSBRSREQUEST_DSQL);