I use following function to load MEMO field contents as text passing as
parameters Dataset and MEMO field name.
Investigating code while running I notice a huge delay while
TTable.CreateBlobStream is executing. Any other part returns normally
and fast.
Can anyone please help?

--------------------------------
// READ MEMO FIELD
function spGetMEMOField( tTable: TDbf; cFieldName: string ): string;
var
   tsMemoStream: Tstream;
   pBuffer: pchar;
   sMemo: string;
   
begin
     tsMemoStream := TStream.Create;
     tsMemoStream := TTable.CreateBlobStream( TTable.FieldByName(
cFieldName ), bmRead );
     tsMemoStream.Position := 0;
     pBuffer := GetMem( 200000 );
     tsMemoStream.read( pBuffer^, 200000 );
     sMemo := strpas( pBuffer );
     Freemem( pBuffer );
     tsMemostream.Destroy;
end; 
--------------------------------

Regards, Panagiotis

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to