BYTE

The BYTE Data Type

Usage

Restrictions applied to BYTE

Methods and Functions to Use With BYTE

The BYTE Data Type

The BYTE data type can store any binary data - large objects like program modules, pictures, sounds, and any other information that can be stored in digital form.

 

The value of BYTE type is limited to 2 gigabytes, but it can also be limited by the storage capacity of your system.

 

Default value: NULL. To change this behaviour, use QX_INITVAR.

 

Return to top

Usage

A variable of this data type can be used:

You can use the LIKE keyword within the DEFINE statement to define a variable like a database column of the BYTE data type.

After you declare the variable of the BYTE data type, use the LOCATE statement to tell the program where the information for this variable is located. A column defined as BYTE type can be assigned to a BYTE variable completely or partially. If you want to assign only a part of the contents of the column to a BYTE variable, you’ll need to specify the beginning and the end of the part you want to assign in bytes using square brackets as delimiters – variable [m, n]. E.g.:

SELECT image1 [1,100] INTO my_pic FROM catalogue

Here m and n are the coordinates of the first byte of a picture from which the part you want to assign begins and the last byte of the piece. The above code will select first 100 bytes of the specified picture image1 into my_pic variable.

 

Return to top

Restrictions Applied to BYTE

There are a number of restrictions that should be kept in mind while using BYTE data type:

 

Return to top

Methods and Functions to Use With BYTE

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.