Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 8th, 2005, 01:53 PM
Authorized User
 
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default How Can I Put Images In Access?

i am using VB6 n MS-Access i have to save images in database which data type is use and how can i save images in database and load i can load images to VB form using the following code

Private Sub LoadPicture_Click()
    With pict
    .InitDir = "C:\Documents and Settings\Administrator\My Documents"
    .Filter = "JPEG image|*.jpg|GIF image|*.gif|BITMAP image|*.bmp|Icon image|*.ico|Cursor image|*.cur|Panerio image|*.pan"
    .ShowOpen
        If .FileName <> "" Then
        imgpic.Picture = LoadPicture(.FileName)
        End If
    End With
End Sub

bye bye

Abdul Wasie
__________________
Abdul Wasie
 
Old May 10th, 2005, 07:04 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You need to create a field using the OLE object data type. This will save the image inside the database, but it bloats it.

Are you just making calls from VB? If so, you should open and close the back end periodically and set the database to compact on close. (Tools>Options>General tab>Check Compact On Close)


mmcdonal
 
Old May 10th, 2005, 12:52 PM
Authorized User
 
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the help

Abdul Wasie





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with inserting images in Access report pankaj_daga Access 1 February 1st, 2007 08:45 AM
Php code to put&get images from mysql not working! angelbeans PHP Databases 1 September 8th, 2006 12:44 PM
viewing images in asp from access arimakidd Classic ASP Databases 1 August 15th, 2006 03:26 AM
pictures/images from Access on ADO form? megasime999 VB Databases Basics 1 September 22nd, 2004 03:42 PM
Web images in Access XP Steven Access 4 September 10th, 2003 11:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.