save()  size()

Chapter 5: General Objects and Methods

set()

Description

Works like an assignment operator, causing the replacement of blob contents with the data contained in the blob or string referenced in the source parameter.

Syntax

set(string source);
set(blob *source);

Parameter

Description

source

A string or a pointer to a blob that contains the data that replaces the current blob data.

Return value

Returns the blob containing the new data, if successful, or the blob containing the old data, if failed.

Examples

Example 48

blob myblob;
string new_stuff;
myblob = “abcdefg”;
new_stuff = “123456”;
myblob.set(&new_stuff);

Usage

Use either the first two lines or the last two lines:

Pointer to object

Object

blob patient_address

blob patient_address;

pb->set(&patient_address);

myblob.set(&patient_address);

blob *p_address;

blob *p_address;

pb->set (p_address);

pb.set(p_address);





Copyright © 2005. Sybase Inc. All rights reserved. size()

View this book as PDF