GetBinary

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods >

GetBinary

Declaration

function GetBinary( sField: String; var Buffer: PChar );

Description

Retrieves a binary value that was stored in a memo field using PutBinary.

Parameters

sField: The name of the memo field that holds the binary data.

Buffer: A pointer to a pre-initialized memory object of the correct size. Use FieldWidth to determine the size of the field.

Delphi Example

// Retrieve an encrypted field

procedure TForm1.Button1Click(Sender: TObject);

var

 cpVar: PChar; 

 iSize: Integer; 

 sVal: String; 

begin

 iSize := ApTbl.FieldWidth( 'PASSWORD' ); 

 GetMem( cpVar, iSize+1 ); 

 ApTbl.GetBinary( 'PASSWORD', cpVar );

 sVal := String( ApTbl.Decrypt( cpVar, 'FooBar', iSize )); 

 ShowMessage( 'Password is: ' + sVal );

 FreeMem( cpVar ); 

end;

See Also

PutBinary, GetString, FieldWidth, Replace