version 2003
PA_SetBlobHandleField (tNum; fNum; newHBlob)
Parameter | Type | Description | |
tNum | short | Table number of the field to access | |
fNum | short | Field number of the field to access | |
newHBlob | PA_Handle | New handle for the BLOB field |
Description
The routine PA_SetBlobHandleField sets the handle of the BLOB field number fNum of the current record of table number tNum to newHBlob.
If the field is not a BLOB field, the routine does nothing and sets an error in PA_GetLastError().
This is useful for memory optimisation: PA_SetBlobField duplicates the BLOB, since PA_SetBlobHandleField changes only the value of the handle to the BLOB field.
IMPORTANT NOTE
After the call, the handle belongs to 4th Dimension. Never dispose of it.
Example
Give a new handle to a field.
PA_Handle h; h = PA_NewHandle(ONE_MILLION_BYTES); // a large one /* . . . work with h . . . */ PA_SetBlobHandleField(tNum, fNum, h); // Now, h belongs to 4D. Never call PA_DisposeHandle on it.
See Also
Error Handling
Use PA_GetLastError to see if an error occurred (eER_InvalidFileNumber, eER_InvalidFieldNumber)