RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBlobStream.Write Method

Writes Count bytes from Buffer to the current position in the field and updates the current position by Count bytes.

Pascal
function Write(const Buffer; Count: Longint): Longint; override;
C++
virtual __fastcall Longint Write(const  Buffer, Longint Count);

Use Write to write Count bytes to the BLOB field, starting at the current position. The Write method for TBlobStream always writes the entire Count bytes, as BLOB data does not necessarily include a termination character. Thus, Write is equivalent to the WriteBuffer method. 

Buffer is the source container for Write and must be of type PChar (Delphi), char * (C++), or equivalent. Write transfers up to Count bytes from Buffer into the BLOB field, starting in the current position, and then advances the current position by the number of bytes actually transferred. Write returns the number of bytes actually transferred (which may be less than the number requested in Count). 

Write checks the Transliterate property of the field, and converts the data from ANSI into the character set of the dataset if Transliterate is true. 

All the other data-writing methods of a BLOB stream (WriteBuffer, WriteComponent) call Write to do their actual writing.

Note: Do not call Write when the TBlobStream was created in bmRead mode.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!