Visual Basic: RDO Data Control

Visual Studio 6.0

ColumnSize Method (Remote Data)

See Also    Example    Applies To

Returns the number of bytes in an rdoColumn object with a data type of rdTypeLONGVARBINARY or rdTypeLONGVARCHAR.


varname = object ! column.ColumnSize( )

The ColumnSize method syntax has these parts:

Part Description
varname The name of a Long or Variant variable.
object An object expression that evaluates to the rdoResultset object containing the rdoColumns collection.
column The name of an rdoColumn object whose ChunkRequired property is set to True.


Depending on the driver being used, the ColumnSize method either returns the size of a binary large object (BLOB) column, or -1 if the size is not available. If the BLOB column size is not available, you can still use the GetChunk method to read chunks of data from your BLOB column. The last block has been fetched when the value returned by GetChunk is smaller than the size requested (for binary data), at least two bytes smaller than your buffer (for character data), or returns a NULL value.

When working with data types that span multiple database pages, you should use the chunk methods to manage the data but this is not an absolute requirement. You should also use the GetChunk and AppendChunk methods to manage chunk data when the ChunkRequired property is True. Note that when the size of BLOB data columns is smaller than the BindThreshold, it is not necessary to use the chunk methods.

Use the ColumnSize method to determine the size of chunk columns.

Because the size of a chunk data column can exceed 64K, you should assign the value returned by the GetChunk method to a variable large enough to store the data returned based on the size returned by the ColumnSize method.

Note   To determine the size of a non-chunk rdoColumn object, use the Size property.