0

In my web application:

I want to store a .Doc file(word file) in database
and then retrieve it and display it in the same format in a web page.

I am using ASP.NET 0.2 and SQL 2005.

thnx.

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Fungus1487
0

will you be looking to edit this document online then update what is in the database ?

also why bother storing this in a database and not just reference a local file ?

0

better to store this in a database because that way you wont accidentally delete the file from disk, making the link broken....

I have been working on this, have the BLOB in the database, working on getting it out again now

I just got code working there to get a file back out based on an ID, but its returning the wrong file for that ID :S lol

0

I had stored the word file in the database but when retrieving it from the database,
it opens in MS word not in a web page.

I want to display it in a web page in the same format.

thnx

0

Im not too sure then, all I need mine to do is give the user the option to open, save or cancel the download.....although at the minute, word is unable to open the file, it cant recognise the file format

0

you need to buffer the file to the page and add the right header for them to open it and not download it to there comp then open it.

you need to add the "Content-Type" header with a value of "application/vnd.ms-word"

this will open your document in the browser window.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.