473,748 Members | 3,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing Unsaved Word Documents as BLOBs

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.Conten ts 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
2 4500
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*******@hhan df.com> wrote in message
news:By******** *************@n ews4.srv.hcvlny .cv.net...
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.Conten ts 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
David Horowitz (dh*******@hhan df.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
5335
by: Ryan Stewart | last post by:
I am in extremely urgent need (by tomorrow) of a way to store files in and retrieve files from an Oracle database using TopLink as an intermediary. I have the JSPs for it, and it works for small files, but larger ones like Word documents and Excel Spreadsheets give an error saying that the data is too large for the field. Can anyone help with this? Our file object has a fileData field which is an array of bytes which is mapped in TopLink to...
2
6442
by: David Horowitz | last post by:
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...
3
2947
by: Dave Smithz | last post by:
Hi There, Being quite new to MS-SQL I would like to ask if there is a general opinion of what approach should be taken to storing things like external documents and images in databases. Should the actual files be stored within the database, or instead should links to the files on a file server or something similar be stored instead. For the end user I imagine it is easier to have everything stored within the
5
2145
by: Don Vaillancourt | last post by:
I'm building a system when one can upload a document to the website. I will be storing the document on the hard-drive for quick/easy access, but I was also thinking of storing it in an existing database since most of the sites information is all stored there. As well there would be only one place to worry about backing up. And if the file on the hard-drive was ever missing or became corrupted, I could restore it form tha database. Is...
3
4726
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around 2Mb) are stored in BLOB column. The amount of documents for the first year should not exceed 5/6 Giga, but I cannot make prevision for the next years. Those documents are mainly just accessed (update and delete are not so
2
2078
by: Joolz | last post by:
Hello everyone, Sorry if this is a FAQ, but I've groups.googled the subject and can't find a definite answer (if such a thing exists). I'm working on a db in postgresql on a debian stable server, ext3 filesystem. The db will contain files, not too many (I expect somewehere between 10 and 100 files max to be inserted daily), and not too big (mostly pdf files, some images. The size will rarely be larger than 1Mb). My plan was to store...
4
1377
by: Kavans | last post by:
Hi, I have following issue and I desperately need some help. I have a requirement in where I need to manage word documents in my website. I need to give user the following things: 1. Facility to upload the word documents 2. These documents will not be saved on any server but rather saved as BLOBs in DB
4
3693
by: JensB | last post by:
I have VB.Net VS2005 App which creates MS Word documents. Clients are using Word 2000 and Word2003. Project refers to MS Word 9.0 Object library, declaring Word as an object. On the Word 2000 machines this works fast and nice, but on the Word 2003 machines it takes 5-10 times longer. Is there a way to make Word 2003 clients to work faster? Recently a warning message, showed up in the error list: "There are updated custom wrappers...
6
3198
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to me like there were performance issues at the time. How about the different types? The MS docs I would expect Access to differentiate and handle appropriately (i.e. .DOC and .XLS).. but how about ..PDF? and can I stash a .TXT document in the...
1
1881
by: neoret | last post by:
Hello. I need a helping hand to help me send an unsaved dokument through a POST call. I have added functionality to word and want to send a unsaved document through a POST call. This works fine when I try sending a saved document - refering to the path and using a filstream like this: FileStream fileStream = new FileStream(remoteFolder + filename,
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.