Results 1 to 7 of 7

Thread: images in db

  1. #1
    Join Date
    Nov 2007
    Posts
    3

    Question Unanswered: images in db

    Hello Everyone,

    I want to store images in a database. So far I am familier with MS Access database. But I know embedding images in MS Access Database makes it grow very large in size and is inefficient.

    For my personal use I want to add images and text in database table. Is there a way to do that in MS Access in an efficient way.

    Are there other freeware easy to use databases available whereby I can do it.

    Would be glad if anyone can help.

    Thanks,
    JG

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Quote Originally Posted by jackgreat
    For my personal use I want to add images and text in database table...

    Is there a way to do that in MS Access
    Yes
    ref this tutorial at our VB sister-site.

    Quote Originally Posted by jackgreat
    ... in an efficient way.
    No.

    Storing images in Access is VERY inefficient. As you mention, it can cause the data file to bloat enormously. In addition to the file size issue itself, since any image must be converted to a bitmap prior to storage, compressed file formats like jpeg are decompressed before being stored.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Dec 2006
    Location
    Momence, IL USA
    Posts
    56
    If you store the data using the "chunk" method as in the link loquin posted, you can view the images in a browser or webbrowser control without having to create a temp file on disk.
    If you use an IIS server to view an asp page, the Response.BinaryWrite method can send the image to the browser. I can post an example if you have IIS and are interested.
    Don't Bogart That Squishee!

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Here's my favorite: http://www.dbforums.com/showpost.php...8&postcount=40

    It allows you to searches for file types, organize them, and save the file path, name, last used date permanently in a table. You can then click on the file and it will determine whether it's a word, access, excel, pictures, etc...and open it with the appropriate program to launch the file. For example, you can have it search your directory (and subdirectories) for all Excel files. As it finds each excel file, it will store the location and filename in the table. A Grouping field and listbox lets you organize your files by the type (ie. Access, Excel, Word, Pictures, etc...) (with ability to search through the listing for any part of the file path or file name) Click on the file in the list box and automatically launch it. You can even send a shortcut of that file to the desktop. Many other options included.
    Last edited by pkstormy; 12-02-07 at 22:52.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Nov 2007
    Posts
    3

    thanks

    Thanks for your replies guys.

    pkstormy, thanks for your feedback But i wanted to store images in database as a whole and not its path or file information.

    Can I store images using a chunk method and retrieve it as a file and show. Would that be efficient. There must be a way of storing images in db efficiently. right? Do you have a code to do it with access db.

    JG

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    This post might come in handy
    George
    Home | Blog

  7. #7
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Quote Originally Posted by jackgreat
    Thanks...There must be a way of storing images in db efficiently. right?
    No. Not efficiently.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •