ActiveX.

Fuga

Registered User.
Local time
Tomorrow, 00:14
Joined
Feb 28, 2002
Messages
566
Ok, so I´m stupid.

In a field in a table I have a bmp picture link, showing the picture in the field in a form. When linking the picture I use the wizard or whatever it is, but I can´t keep on doing this as the number of pictures increase all the time.

When I look in the table, all the fields say is "bitmap image". I want to now where the actual link is stored so I can add new ones automatically.

Fuga.
 
Are you linking or embedding?

Storing a BMP as and OLE object is fairly inefficient... embedding a image stores all the image data as well as a lot of data needed to tell the system what type of data it is, i.e. a bitmap, and how to launch it (OLE data)

In a quick test I discovered that it takes 150kB to store a 75kB bitmap.

Linking is even less efficient because in addition to storing the image data and the OLE data, the link to the original image file is also stored. This lets you open and edit the image and save the changes back to the original file if needed.

[I've got to admit that I wouldn't know where to start in creating a valid OLE object containing a bitmap.]

If your users are never going to need to edit the images there are other ways:

1. You could store a text Filepath to the image and write a function that loads the data into an Image control

2. If the image data really needs to be included within the database: first unload the image data to a temp file (you'll need to write a function for this), then load data into an image control as before.

3. If you're a Windows API whizz-kid you should be able to accomplish 2. entirely in-memory. Don't ask me, I haven't a clue!
 
Two problems solved (?)

Thanks!:)

I think nr 1 would be a good bet.

This also helps keeping the size of my db down.

Fuga.
 

Users who are viewing this thread

Back
Top Bottom