Contents Index GetByteChunk method SetByteChunk method

UltraLite ActiveX User's Guide
  UltraLite ActiveX API Reference
    ULColumn class

GetStringChunk method


Prototype 

GetStringChunk( _
   offset As Long, _
   pStringObj, _
   [ chunkSize ] _
) As Long
Member of UltraliteActiveX.ULColumn

Description 

Fills the string passed in with the binary data from the column. Suitable for LONG VARCHAR columns.

Parameters 

offset    The character offset into the underlying data from which you start getting the String.

pStringObj    The string array you want filled. This variant is passed by reference.

chunkSize    An optional parameter representing the number of characters to retrieve.

Returns 

The number of characters copied. Room is left for a null termination character and the length does not include that character.

Errors  
Error Description
ulSQLE_CONVERSION_ERROR

The error occurs if the column data type isn't TypeString or TypeLongString.

ulSQLE_INVALID_PARAMETER

The error occurs if the column data type is CHAR and the src_offset is greater than 64K.

ulSQLE_INVALID_PARAMETER

The error occurs if src_offset is less than 1 or string length is less than 0.

Example 
' eMbedded Visual Basic
Dim cd As ULColumn
Dim S As Strong
Dim l, offset As Long
S=String(512, vbNulChar)
offset=0
Do
    l=cd.GetStringChunk(offset, S, 512)
    If l=0 then Exit Do
    'use string ins
Loop
// JScript
var cd;
var s;
var l, offset;
l = 0;
While (!l) {
  l = cd.GetStringChunk(offset, s, 512);
}

Contents Index GetByteChunk method SetByteChunk method