Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

SQL Server BackEnd - Pictures

Discussion in 'Information Technology' started by Mythran, Nov 11, 2005.

  1. Mythran

    Mythran
    Expand Collapse
    Guest

    I have a SQL Server database with images (binary). The images were imported
    using .Net (Image saved to a MemoryStream and read into a byte-array that
    was then stored in the DataRow).

    I know that MS Access stored extra information (Ole) for images. Is there a
    way (without saving the image to temp file) to display the image on a form
    in MS Access (as a front-end)?

    Thanks,
    Mythran
     
  2. Loading...


  3. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "Mythran" wrote

    > I have a SQL Server database with images (binary). The images
    > were imported using .Net (Image saved to a MemoryStream and
    > read into a byte-array that was then stored in the DataRow).


    Wow! I don't speak enough .NET jargon to know just what you have stored. It
    almost sounds as if you have converted the image file, whatever it
    originally was, to a single-record binary file -- and most image files are
    multi-record binary files.

    > I know that MS Access stored extra information (Ole) for images. Is

    there a
    > way (without saving the image to temp file) to display the image on a

    form
    > in MS Access (as a front-end)?


    Writing a temp file is sometimes the simplest, easiest, and least-cost way
    to accomplish a purpose; it is not necessarily something to "be avoided at
    all cost". What you have _may_ be displayable in the same way that an image
    saved using the BLOB (Binary Large OBject) approach described in the samples
    mentioned below. Give it a try. (It does write a temp file.)

    On a project back in the '90s, I observed some people waste several thousand
    dollars and lock themselves in to software with a per-user charge just to
    avoid writing a temp file. And it was really an "emotional" decision,
    because they had seen perfectly adequate performance demonstrated with an
    inexpensive display control that did use a temp file.

    The sample imaging databases at http://accdevel.tripod.com illustrate three
    approaches to handling images in Access, and the download includes an
    article discussing considerations in choosing an approach. Two of the
    approaches do not use OLE Objects and, thus, avoid the database bloat, and
    some other problems, associated with images in OLE Objects.

    If you are printing the images in reports, to avoid memory leakage, you
    should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
    PrintFailure.zip is an Access97 MDB containing a report that fails during
    the Access formatting process prior to being spooled to the Printer Driver.
    This MDB also contains code showing how to convert the contents of the Image
    control to a Bitmap file prior to printing. This helps alleviate the "Out of
    Memory" error that can popup when printing image intensive reports.

    Larry Linson
    Microsoft Access MVP
     

Share This Page