July 14, 2006 at 2:59 am
Dear All,
I am working on an application to store binary file data in a DB and hope fully I can retrieve this data and open file with the associated program, Is this possible.
For example If I am storing WORD documents within a database table and I wanted to retrieved the data from the database and open the document without saving the file first to the drive but dynamiclly using the blolb object as the file data.
If you need more clarification on this please do not hesitate to reply to this thread.
Kindest Regards,
Nimish Pankhania
Software Engineer.
July 17, 2006 at 8:00 am
This was removed by the editor as SPAM
July 17, 2006 at 8:43 am
You would handle this within your application. As far as SQL Server is concerned, you are just going to store binary data in a varbinary column. You will want to also have columns with filename and/or file type of the data, so that when you when your application reconstructs the document, it knows what it has. But the storing of the document and rebuilding the document will be done by the application.
Whether you can open a Word document without creating it as a file: I don't know that you can do that. I believe that you will need to create the file for Word to open it, unless there is some feature in Word Com objects that will let your application feed it the document without opening a file. I am not aware of anything like that, but perhaps Word 11 (2003) or Word 12 have that.
Hope this helps.
Mark
July 19, 2006 at 6:58 am
Thanks Mark for the information much appreciated.
To add to this solution I found on the web a way to push the document out to a browser window using
response.binarywrite <field name/Variable Name>
I have yet to test this solution but I have seen examples on development web sites.
Thank you again Mark and spleak to you soon.
Regards,
Nimish
July 19, 2006 at 7:24 am
Yes, that is how to send a file to the web site user. Also, you will want to make sure that you set the Response.ContentType before you do the BinaryWrite, so that the HTTP header is set correctly for the user to know what to do with the file. In your case, you want to have:
Response.ContentType = "application/msword" Response.BinaryWrite arrayByte
Hope this helps
Mark
July 21, 2006 at 8:07 am
July 21, 2006 at 8:15 am
The folder structure that the company currently have would be too confusing to manage outside the database.
You are right that the database size will be huge but space is not an issue for the company and also this would allow an element of a one-stop searching interface to be developed when taking into consideration the FULL text searching capabilities of BLOBS from within SQL 2005. Also the added advantage would be a form of revision control where by documents saved on top of each other can be retraced.
Thank you all again...
Nimish..
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply