Allocates a typed buffer. Depending on the buffer type, a subtype has to be specified. The TUXEDO System provides a variety of typed buffers, and applications are free to add their own buffer types. Silk Performer's buffer handling and manipulating functions automatically detect any of the buffer types listed below and handles them appropriately. Custom buffer types are handled like binary buffers (CARRAY).
STRING, FML, FML32, VIEW, VIEW32, CARRAY
TUXEDO.bdh
TuxGetBuffer( inout hBuffer : number, in sType : string, in sSubType : string optional, in nSize : number optional): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hBuffer | Variable receiving the handle to the typed buffer |
sType |
Buffer type. Predefined typed buffers are:
|
sSubType | Buffer subtype identifying a set of characteristics (optional). |
nSize |
Buffer size (optional). Default buffer size is 1024 bytes for fielded buffers, and 512 bytes for any other buffer types. Note: The default buffer size values
also represent the minimum size, allocating smaller buffers is
impossible.
|
const ID_ELEM1 := 16; ID_ELEM2 := 32; dcltrans transaction TMain var hBuffer, olen: number; begin Tux_tpbegin(30, 0); // allocate buffer TuxGetBuffer(hBuffer, "FML", NULL, 1024); // store two integer values in buffer TuxSetInt(hBuffer, ID_ELEM1, 640); TuxSetInt(hBuffer, ID_ELEM2, 480); // create database table of the appropriate size Tux_tpcall("CREATETABLE", hBuffer, 0, hBuffer, olen, TPNOFLAGS); Tux_tpcommit(0); end TMain;
bankappn.bdf