Board index » delphi » saving Word 97/2000 documents in a blob field (MS SQL 6.5)

saving Word 97/2000 documents in a blob field (MS SQL 6.5)

I have an oleContainer which has a word 97 /2000 object in it. I want to
store the document into a blob field.

Who can show me some code how to do this?
Also i want to show the document in an olecontainer when the user browse
through the records.

Thanks

Marco

 

Re:saving Word 97/2000 documents in a blob field (MS SQL 6.5)


Quote
Marco Dissel wrote:
> I have an oleContainer which has a word 97 /2000 object in it. I want to
> store the document into a blob field.

> Who can show me some code how to do this?
> Also i want to show the document in an olecontainer when the user browse
> through the records.

> Thanks

> Marco

Here's a small excerpt from a perfectly working aplication:

    DocContainer.CreateObjectFromFile(TempDoc,False);
    DocStream =  TBlobStream.Create(
TBlobField(FieldByName('DOCUMENT')),bmReadWrite  );
     try
        DocContainer.SaveToStream(DocStream);
     finally
        DocStream.Free;
     end;

By the way dont' use cached update for this table. Cached updates has a 32
Kb size limit wich will truncate your Word document. Use a live query for
the table that will contain the Word document.

--
Edwin Teisman, The Netherlands
email: e.teis...@wxs.nl

Re:saving Word 97/2000 documents in a blob field (MS SQL 6.5)


Hi Edwin!

On Tue, 08 Jun 1999 09:29:41 +0200, Edwin Teisman <e.teis...@wxs.nl>
wrote:

Quote
>By the way dont' use cached update for this table. Cached updates has a 32
>Kb size limit wich will truncate your Word document. Use a live query for
>the table that will contain the Word document.

Not true.

You can set "BLOB SIZE" property in BDE Administrator/MSSQL driver to
any value other that 32.

tomi.

Other Threads