PA_SetBlobHandleField

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_SetBlobHandleField (tNum; fNum; newHBlob)

ParameterTypeDescription
tNumshortTable number of the field to access
fNumshortField number of the field to access
newHBlobPA_HandleNew 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

PA_GetBlobHandleField.

Error Handling

Use PA_GetLastError to see if an error occurred (eER_InvalidFileNumber, eER_InvalidFieldNumber)


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next