By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,045 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,045 IT Pros & Developers. It's quick & easy.

Storing Unsaved Word Documents as BLOBs

P: n/a
Hi folks,

I want to be able to store and retrieve UNSAVED Word documents as BLOBs. I
got all the info for storing them if they're already saved on the file
system. But what if they're not already saved? I could save them to a temp
file first and then make it a blob, but I'd rather not put them on the file
system at all. I could use Document.Contents to get the Range object for the
whole doc and then BLOB that, but I'm not sure that would be quite the same
as a .doc file, maybe things like Styles and the like would be missing.

TIA!

Dave
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
And a related question -- even if I were to store them from the file system
(using code like in
http://support.microsoft.com/default...b;en-us;258038) how do I
tell the DB (Access in my case, but SQL Server should be the same), that the
BLOB is a Word object? Even when I use the instructions in the KB article, I
get (in Access) a type of "Long Binary Data", whereas if I use the Access
front-end to insert the object, when I view the table later, the type shows
"Microsoft Word Document"...

Thanks!

Dave

"David Horowitz" <dh*******@hhandf.com> wrote in message
news:By*********************@news4.srv.hcvlny.cv.n et...
Hi folks,

I want to be able to store and retrieve UNSAVED Word documents as BLOBs. I
got all the info for storing them if they're already saved on the file
system. But what if they're not already saved? I could save them to a temp
file first and then make it a blob, but I'd rather not put them on the file
system at all. I could use Document.Contents to get the Range object for the
whole doc and then BLOB that, but I'm not sure that would be quite the same
as a .doc file, maybe things like Styles and the like would be missing.

TIA!

Dave

Nov 12 '05 #2

P: n/a
David Horowitz (dh*******@hhandf.com) writes:
And a related question -- even if I were to store them from the file
system (using code like in
http://support.microsoft.com/default...b;en-us;258038) how do I
tell the DB (Access in my case, but SQL Server should be the same), that
the BLOB is a Word object? Even when I use the instructions in the KB
article, I get (in Access) a type of "Long Binary Data", whereas if I
use the Access front-end to insert the object, when I view the table
later, the type shows "Microsoft Word Document"...


I cannot answer for Access, but in SQL Server there is no way you can
get the server itself to keep track of what you have put into an
image column. It is just a bunch of bytes.

You can of course add an extra column to keep track of which object it
is.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.