IfxClob public methods

IfxClob.Close

void IfxClob.Close(IfxSmartLOBOpenMode mode)

Closes the instance.

IfxClob.FromFile

void FromFile(System.String filename, System.Boolean appendToSmartLOB, 
IfxSmartLOBFileLocation fileLocation)

Writes the operating system file filename into the CLOB. If appendToSmartLOB is true the file is written to the end of the CLOB. If it is false it overwrites the current contents of the CLOB.

The value of fileLocation indicates whether the file indicated in filename is located on the client or the server. Server side files are not currently supported.

IfxClob.GetLocator

IfxSmartLOBLocator GetLocator()

Returns the IfxSmartLOBLocator associated with this instance.

IfxClob.Lock

void Lock(System.Int64 smartLOBOffset, IfxSmartLOBWhence whence, 
System.Int64 range,  IfxSmartLOBLockMode lockMode)

Use this method to place a lock on a portion of the CLOB. The type of lock (exclusive or shared) is determined by lockMode.

The lock is placed on a group of contiguous characters that is range characters long. The start of the locked range is determined by the values of smartLOBOffset and whence. How these values interact is describe in the section IfxSmartLOBWhence enumeration.

IfxClob.Open

void IfxClob.Open(IfxSmartLOBOpenMode mode)

Before an instance of IfxClob can be read from or written to it must be opened using this method. The value of mode determines what sort of access will be allowed to the CLOB. See IfxSmartLOBOpenMode enumeration for a description of the different modes.

IfxClob.Read

System.Int64 IfxClob.Read(char[] buff)
System.Int64 IfxClob.Read(char[] buff, System.Int64 buffOffset, 
System.Int64 numCharsToRead, System.Int64 smartLOBOffset, 
IfxSmartLOBWhence whence)

Reads characters into buff from the CLOB represented by this instance. The number returned is how many bytes were successfully read into buff.

If only buff is given, then the CLOB is read into it starting at element 0. This version of the method will not write past the end of the array buff. The CLOB is truncated if it is longer than the buffer. The read begins at the current cursor position of the CLOB.

If the other arguments are provided then exactly numCharsToRead characters are read into buff starting at element buffOffset. An error is returned if this method is asked to write outside the bounds of the array.

Before the read occurs the cursor is moved according to the values of whence and smartLOBOffset. How these values interact is describe in the section IfxSmartLOBWhence enumeration.

IfxClob.Release

void IfxClob.Release()

Use this method to free database server resources used by this instance if the instance was never read from or written to a database. Do not call this method if you have written the CLOB to a database or if it was created because of a read from a database.

After calling this method do not use the instance.

IfxClob.Seek

System.Int64 IfxClob.Seek(System.Int64 offset, IfxSmartLOBWhence whence)

Changes the position of the cursor within the CLOB. The value returned is the new value of IfxClob.Position.

The new position of the cursor is determined by the values of offset and whence. How these values interact is describe in the section IfxSmartLOBWhence enumeration.

IfxClob.ToFile

System.String IfxClob.ToFile(System.String filename, System.IO.FileMode mode, 
IfxSmartLOBFileLocation fileLocation)

Writes the contents of the CLOB to an operating system file named filename. The value of fileLocation determines whether the file will be written on the client or on the server. Server side files are not currently supported.

The value of mode determines how the output file is opened. Look up System.IO.FileMode in the .NET Framework Class Library for details on the available modes.

IfxClob.Truncate

void IfxClob.Truncate(System.Int64 offset)

Deletes everything past offset bytes from the start of the CLOB.

IfxClob.Unlock

void IfxClob.Unlock(System.Int64 smartLOBOffset, IfxSmartLOBWhence whence, 
System.Int64 range)

Use this method to remove all locks placed on a certain range of characters in the CLOB. The size of the range that is unlocked is range characters.

The values of smartLOBOffset and whence determine where the range starts. How these values interact is describe in the section IfxSmartLOBWhence enumeration.

IfxClob.Write

System.Int64 IfxClob.Write(char[] buff)
System.Int64 IfxClob.Write(char[] buff, System.Int64 buffOffset, 
System.Int64 numCharsToWrite, System.Int64 smartLOBOffset, IfxSmartLOBWhence whence)

Writes characters from buff to the CLOB represented by this instance. The number returned is how many characters were successfully written.

If only buff is given, then the entire array is written to the CLOB starting at the current cursor position.

If the other arguments are provided then exactly numCharsToWrite characters are written to the CLOB from buff starting at array element buffOffset. An error is returned if buffOffset is outside the bounds of the array.

Before the write is performed the cursor is moved according to the values of whence and smartLOBOffset. How these values interact is describe in the section IfxSmartLOBWhence enumeration.

If the write starts beyond the current end of the CLOB then it will be padded with values of 0 from the current end to the point where the write begins.