Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store & retrieve images(*) in database(visual data manager/Access)

Status
Not open for further replies.

mohanq

Technical User
Jun 12, 2002
8
US

Hi,

I am able to store image in visual data manager(database table) with the fields

id text, img binary

when i try to load the picture from recordset with the following statement:-

Picture1.picture = loadpicutre(rs(1))

it shows an error file name/path not exists etc.

pls let me know how to retrieve image data and load in picture control using DAO recordset/ADO recordset.

thanks in advance,
mohan.



 
Hi,

You need to use the .appendchunk and .getchunk methods of a ADO recordset. If you know ADO it's not very difficult, look in msdn. I also found and example here but its more complicated than it needs to be. Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
As I've said in this forum before, there are ways and means of avoiding the whole appendchunk/getchunk issues when dealing with pictures. Of course, since the Tek-Tips search engine seems to have 'lost' a whole bunch of messages I can't find the various threads in which alternative methods are proposed. And I'm not near any of my development machines today, so I can't dig out any example code right now...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top