Select a simple large object into a user-defined location
When your program selects a simple-large-object value, the libraries
must receive the data from the database server and transfer it to
the program.
To do this, performs
the following steps:
- Before the transfer, calls the user-defined open function to initialize the user-defined location. The oflags argument of this open function is set to LOC_WONLY.
- receives the simple-large-object value from the database server and puts it into a program buffer.
- calls
the user-defined write function to transfer the simple-large-object
data from the program buffer to the user-defined location.
repeats steps 2 and 3 as many times as needed to transfer the entire simple-large-object value from the database server to the user-defined location.
- After the transfer, performs the clean-up operations that the user-defined close function specifies.
To select a simple large object into a user-defined location, set loc_loctype to LOCUSER and set the loc_open, loc_write, and loc_close fields so they contain the addresses of appropriate user-defined open, write, and close functions.