Set<type>GlobalVar

PowerBuilder Native Interface

IPB_Session interface:

Set<type>GlobalVar method

Description

A set of methods that set the value of a global variable of a specific datatype.

Syntax

SetArrayGlobalVar ( pbfieldID fid, pbarray value ) 
SetBlobGlobalVar ( pbfieldID fid, pbblob value ) 
SetBoolGlobalVar ( pbfieldID fid, pbboolean value ) 
SetByteGlobalVar ( pbfieldID fid, pbbyte value ) 
SetCharGlobalVar ( pbfieldID fid, pbchar value ) 
SetDateGlobalVar ( pbfieldID fid, pbdate value ) 
SetDateTimeGlobalVar ( pbfieldID fid, pbdatetime value ) 
SetDecGlobalVar ( pbfieldID fid, pbdec value ) 
SetDoubleGlobalVar ( pbfieldID fid, pbdouble value ) 
SetIntGlobalVar ( pbfieldID fid, pbint value ) 
SetLongGlobalVar( pbfieldID fid, pblong value ) 
SetLongLongGlobalVar( pbfieldID fid, pblonglong value ) 
SetObjectGlobalVar ( pbfieldID fid, pbobject value ) 
SetPBStringGlobalVar ( pbfieldID fid, pbstring value ) 
SetRealGlobalVar ( pbfieldID fid, pbreal value ) 
SetStringGlobalVar ( pbfieldID fid, LPCTSTR value ) 
SetTimeGlobalVar ( pbfieldID fid, pbtime value ) 
SetUintGlobalVar ( pbfieldID fid, pbuint value ) 
SetUlongGlobalVar ( pbfieldID fid, pbulong value ) 

Argument

Description

fid

The field ID of the global variable

value

The value to be set

Return Values

PBX_RESULT.

Examples

This shows how to add 1 to the value of a global variable:

fid = session -> GetGlobalVarID("l_gvar");
l_val = session -> GetLongGlobalVar(fid, isNull);
session -> SetLongGlobalVar(fid, l_val + 1);

See Also