locked
Read "long binary data" from access db and write out to the web form? RRS feed

  • Question

  • User-96023207 posted

    Hello,

    I have data in access table that is the type of "OLE Object" (long binary data), How do I read this long binary data from the access table and write it out to the webform, can anyone gives me some suggestions on how to implement this?  Thank you so much

    Wednesday, March 4, 2009 9:43 PM

All replies

  • User1677479917 posted

    Hi,

    I have done a quick search and found some links which will help you..

    1.Blob with Access

     http://www.vbdotnetheaven.com/UploadFile/mahesh/BLOBinAdoDotNet04232005065613AM/BLOBinAdoDotNet.aspx

    2. Writing Binary data to a webform:

    http://support.microsoft.com/kb/326502

    If you have a gridiview or some data bound control in which you want to show an image then you can do a shown below:

    under your template field you can put <asp:Image ImageUrl="~/ImageLoaderPage.aspx?ImageID=1" ..../>

    and under  ImageLoaderPage.aspx you can write down the code as shown in above article # 2.

    Give a startup and if you stuck some where give me a shout i am here any time to help you..

    If you face any problem feel free to give me a shout...

    Thank you,

    Happy Coding!!

    Kiran Patil

     

    Wednesday, March 4, 2009 11:16 PM
  • User-96023207 posted

    Thanks klpatil for the information,

    I would be able to read the long binary data from the access table and save it in the text file but the data I have is not a bitmap or jpeg, it is the RTF data with all the format in it.   Is there a way to read/convert the RTF file to the readable format?

     RTF data:

    {\rtf1\ansi\deff0\deflang1033 {\fonttbl{\f0\fmodern COURIER NEW;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\froman Times New Roman;}}{\colortbl\red0\green0\blue0;}\f3\fs16\cf0 {\par\par DETAILS NOT AVAILABLE

    //Writing RTF file to the text area but still have the rtf format

    using (StreamReader sr = new StreamReader("textfilepath"))while ((line = sr.ReadLine()) != null)

    {

    txtMultiLine.Text += line;

    }

    Thursday, March 5, 2009 11:56 AM