December 9, 2004 at 2:54 am
Can I open Word Document from field Image without write file to disk? Has MS Word any Methods to read file from stream?
December 9, 2004 at 3:10 am
You forgot to mention what front-end you use.
If you're doing this in ASP, something like this should work:
...
Response.ContentType = "application/msword"
Response.BinaryWrite oRecSet.Fields("img")
...
This will open up Word and Word is creating a temp file anyway.
I also think, you'd better ask this question in a community devoted to your programming language, since this is only indirectly related to SQL Server. You would do a simple SELECT to retrieve the binary data and the rest (that is, the interpretation of that binary stream) is done in your programming language.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 10, 2004 at 12:59 am
To Frank.
The programming language is Delphi. But it is not important. Application read file *.doc from field Image to Stream object then run com-server (Word) and I don't know how to send stream object to Word.
Certainly I can to write this file to disk and then open his by Word. But it's too slow.
December 10, 2004 at 1:09 am
Now the discussion of whether or not to store BLOB in a database comes into play. You might want to read http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx on this. And again I really think this is more related to Delphi or Word than SQL Server. Sorry, I think, I can't help you that much.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply