473,372 Members | 1,085 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,372 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 3657
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
6
by: Ian Robertson | last post by:
I am trying to write a function that takes a reference to an object as its arguement. The object is created in another function and I am trying to pass the object to another function from within...
6
by: Arghknork | last post by:
Heres a dumb one. I know you can't actually pass reference types by value in C#, but I want to pass an object into a method and allow that method to manipulate a copy of that object, such that the...
5
by: SDS | last post by:
I am writing an ASP.NET application (in C#) that, as part of a particular response, populates a MemoryStream object with binary data that is being collected from a Process object's StandardOutput. ...
0
by: Steve | last post by:
I am using an XMLSerializer to create an xml object of a class in a web application. I am then using an XMLWriter to place this into a memory stream. No problems so far. I have a web service...
11
by: John Pass | last post by:
Hi, In the attached example, I do understand that the references are not changed if an array is passed by Val. What I do not understand is the result of line 99 (If one can find this by line...
8
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of...
2
by: a_agaga | last post by:
Do you know are there some reasons why many do not make processes to communicate through memory? Why network connections (sockets) are used so commonly in IPC (inter process communication)...
0
by: phreak008 | last post by:
I'm using SendMessage(...) to send a message to all other process that might run. It works well. My problem is when I try to pass data using shared memory. Here is my code. In the 1st process, I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.