locked
Access 2010 database with table containing field that contains Word 2010 documents RRS feed

  • Question

  • User1143286320 posted

    I have an Access 2010 database that contains a table with a field ("notes")  that has a data type = OLE Object.  This field contains a single or multipage MS Word document and it opens Word outside of Access.  I can make changes to the document and the table saves all the changes in the Access database.  The other fields are ID, Lastname, Firstname.  In Access I have no problem in opening the table and making changes to the document, but with ASP all I get is "byte.system".  I would appreciate any help in being able to open MS Word and display the document.

    Thursday, December 1, 2011 7:30 PM

Answers

  • User-821857111 posted

    If you want to do this in ASP.NET, you need to write the document to the Response, which you can do using Response.BinaryWrite(). You also need to provide a way for the user to return the updated document to the web server so that the database can be updated. Here's an article that discusses the basics revolving around storing files in Access with ASP.NET: http://www.mikesdotnetting.com/Article/123/Storing-Files-and-Images-in-Access-with-ASP.NET

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 2, 2011 2:28 AM
  • User3866881 posted

    That is a book in the UK.  Could you please tell me where to put the code behind file?  I would really appreciate it.  Thank you.

    Hello:)

    In fact you can drag and drop a button onto the aspx page,and you can double click the button and do what Mikesdotnetting's suggestions。

    Best reguards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 3, 2011 7:53 PM

All replies

  • User-821857111 posted

    If you want to do this in ASP.NET, you need to write the document to the Response, which you can do using Response.BinaryWrite(). You also need to provide a way for the user to return the updated document to the web server so that the database can be updated. Here's an article that discusses the basics revolving around storing files in Access with ASP.NET: http://www.mikesdotnetting.com/Article/123/Storing-Files-and-Images-in-Access-with-ASP.NET

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 2, 2011 2:28 AM
  • User1143286320 posted

    Thanks Mike.  However, I encountered a problem: CodeFile="AccessUpload.aspx.cs" Inherits="AccessUpload.  I do not know where to find the AccessUpload.aspx.cs.  Also "Stream" has a problem: The type or namespace name 'Stream' could not be found (are you missing a using
    directive or an assembly reference?)

    Thank you for your help

    Friday, December 2, 2011 4:55 PM
  • User-821857111 posted

    I do not know where to find the AccessUpload.aspx.cs. 

    That was the code behind. Create a page with a code behind file.

    The type or namespace name 'Stream' could not be found

    Add using System.IO; to the top of your code behind.

    Friday, December 2, 2011 5:31 PM
  • User1143286320 posted

    I created a page to put the code behind file but I do not know what code to use?  Is it listed?  I am new to C#.

    Friday, December 2, 2011 8:00 PM
  • User-821857111 posted

    I wrote an article about how to do it. If you are having trouble nderstanding that article, I suggest you start at the beginning: http://www.amazon.co.uk/Beginning-ASP-NET-Vb-Wrox-Programmer/dp/0470502215/ref=pd_cp_b_1

    Saturday, December 3, 2011 3:51 AM
  • User1143286320 posted

    That is a book in the UK.  Could you please tell me where to put the code behind file?  I would really appreciate it.  Thank you.

    Saturday, December 3, 2011 4:16 PM
  • User-821857111 posted

    Code behind files are a most basic concept in ASP.NET Web Forms. If you don't want to start with a book, try the introductory tutorials here: http://www.asp.net/web-forms

    Saturday, December 3, 2011 5:09 PM
  • User3866881 posted

    That is a book in the UK.  Could you please tell me where to put the code behind file?  I would really appreciate it.  Thank you.

    Hello:)

    In fact you can drag and drop a button onto the aspx page,and you can double click the button and do what Mikesdotnetting's suggestions。

    Best reguards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 3, 2011 7:53 PM