SetByte

Description

Sets data of type Byte for a blob variable.

Syntax

SetByte ( blobvariable, n, b)

Argument

Description

blobvariable

A variable of the Blob datatype in which you want to insert a value of the Byte datatype

n

The number of the position in blobvariable at which you want to insert a value of the Byte datatype

b

Data of the Byte datatype that you want to set into blobvariable at position n.


Return value

Integer.

Returns 1 if it succeeds or -1 if n exceeds the scope of blobvariable; it returns null if the value of any of its arguments is null.

Examples

This example adds the byte equivalent of 37 at the initial position of the emp_photo blob. If no byte is assigned to the second position, the blob displays as the ASCII equivalent of 37 (the percent character, %) in the second message box:

blob  {100} emp_photo
byte b1 = byte (37)
int li_rtn
li_rtn = SetByte(emp_photo, 1, b1)
messagebox("setbyte", string(b1))
messagebox("setbyte", string(emp_photo))

See also

Byte

GetByte