Groups | Blog | Home
all groups > c# > april 2007 >

c# : Retrieving date from sql server.


Marc Gravell
4/11/2007 9:07:58 PM
Very few applications support loading from memory accross processes.
You are most-likely going to have to write a file to the designated
"temp" area, ask the 2nd app to load it, then (when you are sure)
clean up after yourself. To illustrate with an example, a web-server
can stream BLOB data to the client from a memory buffer (since no
external processes are involved), but at the client the browser has to
write it to the local disk before opening the plugin / viewer.

Marc
Pawel
4/11/2007 11:59:07 PM
Hi!

I'm writting form applications wich will open files (*.doc, *.dsw, etc)
directly from database at the moment.
I read data from row (image column) and with reader and fill in data to byte
table (byte[]).
And how can I open the other aplication and load the data (byte[]).
I don't want to write the files on the hard disc and open them from code

best regards
Paul

Nicholas Paldino [.NET/C# MVP]
4/12/2007 12:09:32 AM
Paul,

It completely depends on the application. More likely than not, Office
documents support the IPersistMemory interface, which you can use to load
documents from memory (you will have to load the byte array into unmanaged
memory though, or use unsafe code to provide a pointer to a the fixed array
pointer). However, for other applications, it depends completely them.

The best bet here, if you have a need to have multiple document types
opened by multiple applications is to save the file on the hard drive and
then have the shell open the appropriate program that is associated with the
file.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

[quoted text, click to view]

AddThis Social Bookmark Button