Board index » delphi » Saving MS Word files in SQL Server

Saving MS Word files in SQL Server

Okay, you can launch a .DOC file via OLE automation and MS Word will
open the file.  But, alas, it's a REAL FILE on your hard disk -- wasting
valuable space and directory resources.
Wouldn't it be great to have the whole file in a field within a SQL
Server table... maybe as a BLOb field?  
How can you do this, though?  You can only associate a TOLEContainer
object to a FILE... or am I wrong?
Has anyone tried this?
-Dave

 

Re:Saving MS Word files in SQL Server


David,
You're wrong. There are two ways (at least) to handle what you are trying to
do.
1) Save document to temporary files, stream the file in a variable, stream
the variable in a BlobStream opened on a ttable or Tquery field.

2) Stream the entire component (OLEContainer) in a Database BLOB field

I can send you some doc if you wish

Luca Botti
(bo...@cli.di.unipi.it)
(bo...@geocities.com)
Tek Soluzioni Informatiche

David Eisenberg ha scritto nel messaggio <344FE1E9.5...@titleserv.com>...

Quote
>Okay, you can launch a .DOC file via OLE automation and MS Word will
>open the file.  But, alas, it's a REAL FILE on your hard disk -- wasting
>valuable space and directory resources.
>Wouldn't it be great to have the whole file in a field within a SQL
>Server table... maybe as a BLOb field?
>How can you do this, though?  You can only associate a TOLEContainer
>object to a FILE... or am I wrong?
>Has anyone tried this?
>-Dave

Other Threads