471,344 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Passing a memory stream to Process object?


Hi Everyone ...

I have a bunch of BLOB data (MS Word and PDF docs mainly) stored in SQL
2005; no problems with ordinary CRUD operations but I'd like to read my
data and "feed it" to a Process() object so the user can retrieve a document
and have it open in Word or Acrobat without my first writing it to disk

And I'm lost on next steps here ... anyone got a suggestion?

TIA
mj

Aug 19 '08 #1
3 3571
On Mon, 18 Aug 2008 19:41:48 -0700, Maura Jenkins <mj@nospam.comwrote:
Hi Everyone ...

I have a bunch of BLOB data (MS Word and PDF docs mainly) stored in SQL
2005; no problems with ordinary CRUD operations but I'd like to read my
data and "feed it" to a Process() object so the user can retrieve a
document
and have it open in Word or Acrobat without my first writing it to disk

And I'm lost on next steps here ... anyone got a suggestion?
If I understand your question correctly, then no...the OS just isn't built
that way. Short of hacking the application, you can't just inject data
into it like that. The application would have to be written specifically
to support that sort of operation. Word, and I'm pretty sure Acrobat
(Reader or full version), simply does not at all, and certainly not in a
way that would be supported through the Process object (which can only
redirect the standard input and output streams for a given process).

Pete
Aug 19 '08 #2
*some* apps might let you use a named pipe to do this, but to be
honest the amount of hacking and debugging just isn't worth it (since
the client may assume seekable etc) - save it to the tmp area are load
it from there...

As another possible alternative, you might be able to set up an
HttpListener to act as a web-server, and send the process a local http
address (which you then respond to with your data) - but again, saving
it as a local file is just the simplest (and least brittle) answer.

Marc
Aug 19 '08 #3
Maura Jenkins wrote:
I have a bunch of BLOB data (MS Word and PDF docs mainly) stored in SQL
2005; no problems with ordinary CRUD operations but I'd like to read my
data and "feed it" to a Process() object so the user can retrieve a document
and have it open in Word or Acrobat without my first writing it to disk
For most practical purposes: no.

If you really want to then make you app act as a file server
and serve the in memory structure as a file and let the app
read from the "network" drive/share.

Arne
Aug 20 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ian Robertson | last post: by
6 posts views Thread by Arghknork | last post: by
5 posts views Thread by SDS | last post: by
reply views Thread by Steve | last post: by
11 posts views Thread by John Pass | last post: by
8 posts views Thread by Adrian | last post: by
2 posts views Thread by a_agaga | last post: by
reply views Thread by Ronak mishra | last post: by

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.