Save and Retrieve Picture In Access Database


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Save and Retrieve Picture In Access Database

  1. #1
    Larry Rebich Guest

    Save and Retrieve Picture In Access Database

    I want to save and then retrieve a picture in an Access database using DAO.
    I can't find any sample code to do this. I believe the Access data type is
    'Ole Object'. But I can't save a picture in the database using DAO.

    Do you have any sample code that shows how to save and retrieve a picture in
    an Access database using DAO?

    What is the VB datatype - is it 'Picture'?

    I am on the road and can't get to this news group very easily. Could you
    reply to the news group and to me at my e-mail address which is
    larry@buygold.net

    Thanks and Cheers,
    Larry Rebich

    VB Tips link to:
    http://www.buygold.net/tips.html





  2. #2
    Douglas J. Steele Guest

    Re: Save and Retrieve Picture In Access Database

    Storing pictures in an Access database is generally considered to be A Bad
    Idea, Larry, because Access is quite inefficient on how it stores images,
    and you'll experience extreme bloat. Much better is to store the images
    external to the database, and store the path in Access.

    A couple of relevant references for you at Dev Ashish's "The Access Web" are
    http://www.mvps.org/access/forms/frm0030.htm and
    http://www.mvps.org/access/forms/frm0044.htm

    HTH

    --

    Doug Steele, Microsoft Access MVP
    Beer, Wine and Database Programming. What could be better?
    Visit "Doug Steele's Beer and Programming Emporium"
    http://I.Am/DougSteele/


    Larry Rebich <lrebich@earthlink.net> wrote in message
    news:399aad68@news.devx.com...
    > I want to save and then retrieve a picture in an Access database using

    DAO.
    > I can't find any sample code to do this. I believe the Access data type is
    > 'Ole Object'. But I can't save a picture in the database using DAO.
    >
    > Do you have any sample code that shows how to save and retrieve a picture

    in
    > an Access database using DAO?
    >
    > What is the VB datatype - is it 'Picture'?
    >
    > I am on the road and can't get to this news group very easily. Could you
    > reply to the news group and to me at my e-mail address which is
    > larry@buygold.net
    >
    > Thanks and Cheers,
    > Larry Rebich
    >
    > VB Tips link to:
    > http://www.buygold.net/tips.html
    >
    >
    >
    >




  3. #3
    Larry Rebich Guest

    Re: Save and Retrieve Picture In Access Database

    Doug,

    Thanks for the advice. But the application I am developing requires that I
    store one 'logo' picture in an Access database. None of the articles you
    reference show how to store then retrieve a picture in a database using VB
    DAO code.

    Please help: Could someone provide the VB DAO code needed to store a picture
    in an Access database.

    Thanks and Cheers,
    Larry Rebich


    "Douglas J. Steele" <djsteele@idirect.com> wrote in message
    news:399bd4b3@news.devx.com...
    > Storing pictures in an Access database is generally considered to be A Bad
    > Idea, Larry, because Access is quite inefficient on how it stores images,
    > and you'll experience extreme bloat. Much better is to store the images
    > external to the database, and store the path in Access.
    >
    > A couple of relevant references for you at Dev Ashish's "The Access Web"

    are
    > http://www.mvps.org/access/forms/frm0030.htm and
    > http://www.mvps.org/access/forms/frm0044.htm
    >
    > HTH
    >
    > --
    >
    > Doug Steele, Microsoft Access MVP
    > Beer, Wine and Database Programming. What could be better?
    > Visit "Doug Steele's Beer and Programming Emporium"
    > http://I.Am/DougSteele/
    >
    >
    > Larry Rebich <lrebich@earthlink.net> wrote in message
    > news:399aad68@news.devx.com...
    > > I want to save and then retrieve a picture in an Access database using

    > DAO.
    > > I can't find any sample code to do this. I believe the Access data type

    is
    > > 'Ole Object'. But I can't save a picture in the database using DAO.
    > >
    > > Do you have any sample code that shows how to save and retrieve a

    picture
    > in
    > > an Access database using DAO?
    > >
    > > What is the VB datatype - is it 'Picture'?
    > >
    > > I am on the road and can't get to this news group very easily. Could you
    > > reply to the news group and to me at my e-mail address which is
    > > larry@buygold.net
    > >
    > > Thanks and Cheers,
    > > Larry Rebich
    > >
    > > VB Tips link to:
    > > http://www.buygold.net/tips.html
    > >
    > >
    > >
    > >

    >
    >




  4. #4
    Douglas J. Steele Guest

    Re: Save and Retrieve Picture In Access Database

    Northwinds.mdb has photos in the Employees table (used in form Employees),
    but I'm not sure they have an example of loading the table. Hopefully
    between that, and the help for AppendChunk and GetChunk, you'll be able to
    accomplish what you're trying to do.

    --

    Doug Steele, Microsoft Access MVP
    Beer, Wine and Database Programming. What could be better?
    Visit "Doug Steele's Beer and Programming Emporium"
    http://I.Am/DougSteele/


    Larry Rebich <lrebich@earthlink.net> wrote in message
    news:399d5834@news.devx.com...
    > Doug,
    >
    > Thanks for the advice. But the application I am developing requires that I
    > store one 'logo' picture in an Access database. None of the articles you
    > reference show how to store then retrieve a picture in a database using VB
    > DAO code.
    >
    > Please help: Could someone provide the VB DAO code needed to store a

    picture
    > in an Access database.
    >
    > Thanks and Cheers,
    > Larry Rebich
    >
    >
    > "Douglas J. Steele" <djsteele@idirect.com> wrote in message
    > news:399bd4b3@news.devx.com...
    > > Storing pictures in an Access database is generally considered to be A

    Bad
    > > Idea, Larry, because Access is quite inefficient on how it stores

    images,
    > > and you'll experience extreme bloat. Much better is to store the images
    > > external to the database, and store the path in Access.
    > >
    > > A couple of relevant references for you at Dev Ashish's "The Access Web"

    > are
    > > http://www.mvps.org/access/forms/frm0030.htm and
    > > http://www.mvps.org/access/forms/frm0044.htm
    > >
    > > HTH
    > >
    > > --
    > >
    > > Doug Steele, Microsoft Access MVP
    > > Beer, Wine and Database Programming. What could be better?
    > > Visit "Doug Steele's Beer and Programming Emporium"
    > > http://I.Am/DougSteele/
    > >
    > >
    > > Larry Rebich <lrebich@earthlink.net> wrote in message
    > > news:399aad68@news.devx.com...
    > > > I want to save and then retrieve a picture in an Access database using

    > > DAO.
    > > > I can't find any sample code to do this. I believe the Access data

    type
    > is
    > > > 'Ole Object'. But I can't save a picture in the database using DAO.
    > > >
    > > > Do you have any sample code that shows how to save and retrieve a

    > picture
    > > in
    > > > an Access database using DAO?
    > > >
    > > > What is the VB datatype - is it 'Picture'?
    > > >
    > > > I am on the road and can't get to this news group very easily. Could

    you
    > > > reply to the news group and to me at my e-mail address which is
    > > > larry@buygold.net
    > > >
    > > > Thanks and Cheers,
    > > > Larry Rebich
    > > >
    > > > VB Tips link to:
    > > > http://www.buygold.net/tips.html
    > > >
    > > >
    > > >
    > > >

    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center