The ifx_lo_open() function
The ifx_lo_open() function opens a smart large object.
Syntax
ifx_lo_open(lofd, loptr, flags)
Arguments
Argument | Type | Use | Description |
---|---|---|---|
lofd | SQL_INTEGER | Output | Smart-large-object file descriptor. This file descriptor is only valid within the current database connection. |
loptr | SQL_INFX_UDT_FIXED | Input | Smart-large-object pointer structure |
flags | SQL_INTEGER | Input | Mode in which to open the smart large object. |
Usage
- Opens the loptr smart large object in the access mode that flags specifies.
- Sets the seek position to byte zero.
- Locks the smart large object.
Access mode | Type of lock |
---|---|
Dirty read | No lock |
Read only | Shared lock |
Write only, write/append, or read/write | Update lock. When you call ifx_lo_write() or ifx_lo_writewithseek() for the smart large object, the database server promotes the lock to an exclusive lock. |
The database server loses this lock when the current transaction terminates. The database server obtains the lock again the next time you call a function that needs a lock.
- Associates the smart large object with the current connection.
When you close this connection, the database server deallocates any associated smart large objects that have a reference count of zero. The reference count indicates the number of database columns that refer to the smart large object.
- Returns a file descriptor that identifies the smart large object.
The database server uses the default parameters that the call to ifx_lo_open() establishes to determine whether to lock or log subsequent operations on the smart large object.