473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Document to BLOB

Anyone have any examples of writing the contents of a document (Word or
whatever) out to a BLOB field? I could take it from a file but I would also
like to know how to grab it from the application itself, which I believe
would entail opening the document editor within my app.
Nov 17 '05 #1
2 1722
Christopher,

I don't know of many applications that support this. Word doesn't
support this directly. I believe you could probably get the IPersistMemory
interface (a COM interface) from the Document object in word and then get
the bytes from there, but ultimately, that is a waste, to load the
application and have it spit out the bytes to you, when you can just read it
to disk.

A blob field will be represented as a byte array in .NET in the data
set, so all you would have to do is load the contents into a byte array, and
assign it to the blob field in the data set. The data adapter will worry
about the rest.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Christopher Weaver" <we*****@nospamverizon.net> wrote in message
news:es**************@TK2MSFTNGP14.phx.gbl...
Anyone have any examples of writing the contents of a document (Word or
whatever) out to a BLOB field? I could take it from a file but I would
also like to know how to grab it from the application itself, which I
believe would entail opening the document editor within my app.

Nov 17 '05 #2
Thanks. That's exactly what I needed to know.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uP**************@TK2MSFTNGP10.phx.gbl...
Christopher,

I don't know of many applications that support this. Word doesn't
support this directly. I believe you could probably get the
IPersistMemory interface (a COM interface) from the Document object in
word and then get the bytes from there, but ultimately, that is a waste,
to load the application and have it spit out the bytes to you, when you
can just read it to disk.

A blob field will be represented as a byte array in .NET in the data
set, so all you would have to do is load the contents into a byte array,
and assign it to the blob field in the data set. The data adapter will
worry about the rest.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Christopher Weaver" <we*****@nospamverizon.net> wrote in message
news:es**************@TK2MSFTNGP14.phx.gbl...
Anyone have any examples of writing the contents of a document (Word or
whatever) out to a BLOB field? I could take it from a file but I would
also like to know how to grab it from the application itself, which I
believe would entail opening the document editor within my app.


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Carolyn Longfoot | last post by:
Help! This is driving me crazy... I'm trying to read a BLOB from a db and display it in a browser, like so: $query="SELECT blob from table where blob_id=9"; $result=mysql_query($query);...
8
by: Sandy Norton | last post by:
Hi folks, I have been mulling over an idea for a very simple python-based personal document management system. The source of this possible solution is the following typical problem: I...
3
by: Carmine | last post by:
I have to add a date column to a db2/zos table with a blob column. Can I rename the blob table to old, create a new table with the date column, then insert/select the data from the old table? ...
8
by: Tim Murphy | last post by:
How do you read/write a Word document embedded in an OLE Object field in an Access table with VB.NET? I have an Access application where users are creating and editing Word documents that are...
0
by: Nata | last post by:
hi all i am trying to store the XML Document object into MS SQL2005 i want to store this as whole not different tables; plz help me regarding this i am trying form last two weeks i asked many...
6
by: Bob Alston | last post by:
I am looking for others who have built systems to scan documents, index them and then make them accessible from an Access database. My environment is a nonprofit with about 20-25 case workers who...
2
by: Vinciz | last post by:
hi guys... im new in java and i would love to learn some of these... basically i got a sample code to retrieve the blob from the mysql. however, i dont really know what to do with these...
9
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting...
4
by: skunapareddy | last post by:
I am needing to read a blob from database and pass it to another java program. I researched internet and found a program that reads a file on the client pc and gives bytes, but when I modified the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.