One For The Techies 
Author Message
 One For The Techies

I have an Access 2.0 application.  The entire application is done
except for one thing.  I have a file that needs imported.  However,
it has an id, then a filename to a bitmap.

Example:  "ID001","A:\BITMAP1"
          "ID002","A:\BITMAP2"
                  ...
          "ID???","A:\BITMAP?"

I have a table that has an Id and a OLE Object.

My question is this:  How can I through Visual Basic for Applications
insert (link or embeded) a bitmap to a table directly.

Been working on this for 4 days now without avail.
--
                 A L E X A N D E R     L A W S O N
                               M.S.F.W.
                       SPRINGFIELD, ILLINOIS
====================================================================



Fri, 19 Mar 1999 03:00:00 GMT  
 One For The Techies



Quote:
>I have an Access 2.0 application.  The entire application is done
>except for one thing.  I have a file that needs imported.  However,
>it has an id, then a filename to a bitmap.
>Example:  "ID001","A:\BITMAP1"
>          "ID002","A:\BITMAP2"
>                  ...
>          "ID???","A:\BITMAP?"
>I have a table that has an Id and a OLE Object.
>My question is this:  How can I through Visual Basic for Applications
>insert (link or embeded) a bitmap to a table directly.
>Been working on this for 4 days now without avail.
>--
>                 A L E X A N D E R     L A W S O N
>                               M.S.F.W.
>                       SPRINGFIELD, ILLINOIS
>====================================================================

This is all documented in the knowledgebase. I'm not sure of the
article number but it has to do with using GetChunk. You have to read
the bitmap header info and then start reading it in chunks of so many
bytes and placing into another file and then store this in the DB. The
best way to get this info is to download the VB Knowledgebase in help
format, it also has a lot of other tricks and tips in it.

HTH,
Ed Phillippe

********************************************************
**  Southern Indiana Bass Fishing / Outdoor Software  **
**    HTTP://www.evansville.net/~dlion/mypage.htm    **
********************************************************



Sat, 20 Mar 1999 03:00:00 GMT  
 One For The Techies

Quote:
>I have an Access 2.0 application.  The entire application is done
>except for one thing.  I have a file that needs imported.  However,
>it has an id, then a filename to a bitmap.
>Example:  "ID001","A:\BITMAP1"
>          "ID002","A:\BITMAP2"
>                  ...
>          "ID???","A:\BITMAP?"
>I have a table that has an Id and a OLE Object.
>My question is this:  How can I through Visual Basic for Applications
>insert (link or embeded) a bitmap to a table directly.

You can store the bitmaps in the database, but I would not recommend
it. They will occupy three to four times space as their original size.
Instead store the path to the images. Having said that, here's how to
store the bitmaps in the databse:

1. Tie a data dotrol to your database and table.  
2. Bind the data control to an image control and set the image
control's  datafield to the OLE field in your table.
3. Use the LoadPicture function to load an image into the Picture
property of the image box
4. Refresh the data control.

Regards

Ray



Wed, 24 Mar 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How To: Quate an easy one for techies..... :-)

2. THIS IS THE ONE ! - Sharp Techies Wanted

3. IDEAL Home Based Business for Techies

4. In Process Server - Techies only :)

5. -VB one-one-one tutoring

6. Fast Way to update one field in one record

7. Auto create record for one-to-one relationship tables

8. Procedure with 2 record sets one select, one update

9. Problem for only one user, every one else works fine

10. Two Virtually Identical Modules, One Works, One doesn't

11. Adding records with one-to-one relationship

12. Need to copy tasks from one project to another one

 

 
Powered by phpBB® Forum Software