ifx_lo_open(lofd, loptr, flags)
The function accepts the following 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. For more information, see Access Modes. |
The ifx_lo_open() function performs the following steps to open a smart large object:
As the following table describes, the access mode determines the type of lock.
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.
As an alternative, you can use a BEGIN WORK transaction block and place a COMMIT WORK or ROLLBACK WORK statement after the last statement that needs to use the lock.
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.
The database server uses the default parameters that the call to ifx_lo_open() establishes to determine whether or not to lock or log subsequent operations on the smart large object.