[Top] [Prev] [Next] [Bottom] [Contents]

SgeSetAdHocFlag

Sets the ad hoc flag for an allocated data structure which is used to execute a Stored Procedure or DSQL Object.

Synopsis

#include "WorkingDialog.h"
void SgeSetAdHocFlag(pSgeWorkCallData p);

Arguments

p
A valid, allocated pSgeWorkCallData structure.

Return Values

None.

Description

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.

Example

/*** 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);

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.