Set<type>ArrayItem

PowerBuilder Native Interface

IPB_Session interface:

Set<type>ArrayItem method

Description

Syntax

SetBlobArrayItem ( pbarray array, pblong dim[ ], pbblob value ) 
SetBoolArrayItem ( pbarray array, pblong dim[ ], pbboolean value ) 
SetByteArrayItem ( pbarray array, pblong dim[ ], pbbyte value ) 
SetCharArrayItem ( pbarray array, pblong dim[ ], pbchar value ) 
SetDateArrayItem ( pbarray array, pblong dim[ ], pbdate value ) 
SetDateTimeArrayItem ( pbarray array, pblong dim[ ], pbdatetime value ) 
SetDecArrayItem ( pbarray array, pblong dim[ ], pbdec value ) 
SetDoubleArrayItem ( pbarray array, pblong dim[ ], pbdouble value ) 
SetIntArrayItem ( pbarray array, pblong dim[ ], pbint value ) 
SetLongArrayItem ( pbarray array, pblong dim[ ], pblong value ) 
SetLongLongArrayItem ( pbarray array, pblonglong dim[ ], pblong value ) 
SetObjectArrayItem ( pbarray array, pblong dim[ ], pbobject obj ) 
SetPBStringArrayItem ( pbarray array, pblong dim[ ], pbstring value ) 
SetRealArrayItem ( pbarray array, pblong dim[ ], pbreal value ) 
SetStringArrayItem ( pbarray array, pblong dim[ ], LPCTSTR value ) 
SetTimeArrayItem ( pbarray array, pblong dim[ ], pbtime value ) 
SetUintArrayItem ( pbarray array, pblong dim[ ], pbuint value ) 
SetUlongArrayItem ( pbarray array, pblong dim[ ], pbulong value ) 

Return Values

Examples

pblong         dim[1];
char *         cstr;
pbuint   numDimensions = 1;
PBArrayInfo::ArrayBound bound;

bound.lowerBound = 1;
bound.upperBound = size;
d_pbarray = d_session->NewBoundedSimpleArray
    (pbvalue_string, numDimensions, &bound);

for (int i = 1; i <= size; i++ )
{
   dim[0] = i;   
   // add application-specific code here to
   // get array value
   pbstring pValue = d_session->NewString(cstr);
   d_session->SetPBStringArrayItem(d_pbarray, dim,
      pValue);

   delete [] cstr;
}
pbv.SetArray(d_pbarray);

Usage

See Also