jam()  paste()

Chapter 5: General Objects and Methods

load()

Description

Reads the file identified in the parameter and copies its contents into the blob, appending a line-feed character (“0x0a”). The file can contain any type of data. The load() method reads the data until it encounters an end-of-file condition.

Syntax

load(string filename);

Parameter

Description

filename

String object that contains the name of the file to read. Can contain a drive and path designation as well as a data file name.

Return value

Integer. Returns 1 for success, and 0 or the negative value of the UNIX error number for the error that caused the method to fail, if failed.

Usage

Pointer to object

Object

pb->load(“./datafile.dat”);

myblob.load(“/datafile.dat”);

string data_file_name;

data_file_name=     “c:\new\files\blob_file”;

pb->load(data_file_name);

myblob.load(data_file_name);





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

View this book as PDF