Board index » delphi » OLE retrieving and storing from a PARADOX Table with D16

OLE retrieving and storing from a PARADOX Table with D16

Hellow World !

I would appreciate someone to tell me the best way to retrive and store a
OLE from a PARADOX 5 Table.

At the moment I'm using the SaveToFile and ReadFromFile functions with the
TOLEContainer and the OLE field as follows:

OLEContainer.SaveToFile('TEMP.OLE');
TableOLE.Edit;
TBLOBField(TableOLE.FieldByName('OLE')).ReadFromFile('TEMP.OLE');
TableOLE.Post;

It works but very slowly !

Any suggest to improve this ?

Thanks in advance

Modesto
BARCELONA
(SPAIN)

 

Re:OLE retrieving and storing from a PARADOX Table with D16


In article <01bc1a85$757e1120$43b4e...@msm.jet.es>, =?ISO-
8859-1?Q?Modesto_S=E1nchez?= <m...@jet.es> writes

Quote
>Hellow World !

>I would appreciate someone to tell me the best way to retrive and store a
>OLE from a PARADOX 5 Table.

>At the moment I'm using the SaveToFile and ReadFromFile functions with the
>TOLEContainer and the OLE field as follows:

>OLEContainer.SaveToFile('TEMP.OLE');
>TableOLE.Edit;
>TBLOBField(TableOLE.FieldByName('OLE')).ReadFromFile('TEMP.OLE');
>TableOLE.Post;

>It works but very slowly !

I think your answer is a TBlobStream :

procedure TMainForm.NotesDSUpdateData(Sender: TObject);
var Stream : TBlobStream;
begin
     Stream := TBlobStream.Create(BugData.NotesNote,bmWrite);
     Ole1.SaveToStream(Stream);
     Stream.Free;
end;

{BugData.NotesNote is an TBlobField, Ole1 is a TOleContainer}

To get the data out again I use :

           Stream := TBlobStream.Create(BugData.NotesNote,bmRead);
           Ole1.LoadFromStream(Stream);
           Stream.Free;

Mark

--
Mark Williams                   M...@polyhdrn.demon.co.uk

Polyhedron Software Ltd.        
Programs for Programmers - QA, Compilers, Graphics

************ Visit our Web site on http://www.polyhedron.co.uk/ ************

Other Threads