Oracle Call Interface Programmer's Guide Release 9.0.1 Part Number A89857-01 |
|
More OCI Relational Functions, 29 of 97
Assigns one LOB/FILE locator to another.
sword OCILobLocatorAssign ( OCISvcCtx *svchp, OCIError *errhp, CONST OCILobLocator *src_locp, OCILobLocator **dst_locpp );
The OCI service context handle.
An error handle you can pass to OCIErrorGet()
for diagnostic information in the event of an error.
The LOB/FILE locator to copy from.
The LOB/FILE locator to copy to. The caller must allocate space for the OCILobLocator by calling OCIDescriptorAlloc()
.
This call assigns the source locator to the destination locator. After the assignment, both locators refer to the same LOB data. For internal LOBs, the source locator's LOB data gets copied to the destination locator's LOB data only when the destination locator gets stored in the table. Therefore, issuing a flush of the object containing the destination locator copies the LOB data. For FILEs only the locator that refers to the OS file is copied to the table; the OS file is not copied.
Note that this call is similar to OCILobAssign()
but OCILobLocatorAssign()
takes an OCI service handle pointer instead of an OCI environment handle pointer. Also, OCILobLocatorAssign()
can be used for temporary LOBs and OCILobAssign()
cannot be used for temporary LOBs.
If the destination locator is for a temporary LOB, the destination temporary LOB is freed before assigning the source LOB locator to it. If the source LOB locator refers to a temporary LOB, the source temporary LOB is deep copied and a destination locator is created to refer to the new deep copy of the temporary LOB. To avoid this deep copy, the user should use the equal sign to ensure that two LOB locator pointers refer to the same LOB locator.
OCIErrorGet()
,
OCILobAssign(),
OCILobIsEqual(),
OCILobLocatorIsInit()
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|