Contents Index GetStringChunk method SetToDefault method

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

SetByteChunk method


Prototype 

SetByteChunk ( _
   ByteArray, _
   [ length ] _
) As Boolean
Member of UltraliteActiveX.ULColumn

Description 

Sets the value of the column in the database to the array of bytes in the data field.

Parameters 

ByteArray    An array of bytes of type Variant.

length    The length of the array.

Returns 

True if successful.

False if unsuccessful.

Errors set 
Error Description
ulSQLE_CONVERSION_ERROR The error occurs if the column data type is not BINARY or LONG BINARY.
ulSQLE_INVALID_PARAMETER The error occurs if the data length is less than 0.
ulSQLE_INVALID_PARAMETER The error occurs if the data length is greater than 64K.
Example 

In the following example, edata is a column name and the first 232 bytes of the data variable are stored in the database.

' eMbedded Visual Basic
Dim data (1 to 512) As Byte
' ...
table.Columns.Item("edata").SetByteChunk(data,232)
// JScript
var data = new Array();
// ...
table.Columns.Item("edata").SetByteChunk(data,232);

Contents Index GetStringChunk method SetToDefault method