One For The Techies

One For The Techies

Post by Alex Lawso » Tue, 01 Oct 1996 04:00:00



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
====================================================================

 
 
 

One For The Techies

Post by Ed Phillip » Wed, 02 Oct 1996 04:00:00




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    **
********************************************************

 
 
 

One For The Techies

Post by A. R. Endalwag » Sun, 06 Oct 1996 04:00:00


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

 
 
 

1. SQL Joins - one for the techies

I have an interesting problem.

Three tables:
Company - A list of companies (100,000 records)
Fields - ID,CompanyName,SubCategory1,SubCategory2,SubCategory3

SC - Sub-categories that each company can fall into (1000 records)
Fields - ID,SubCategoryDescription,MainCategory1,MainCategory2

MC - Main categories that each sub-category can fall into (24 records)
Fields - ID,MainCategoryDescription

Each Company can be in 3 sub-categories. Each sub-category can be in 2
main categories.

How can I work out which main categories each company is in (simply with
one query).

Ideally I want to do a search for all companies which can fall into main
category 1

Cheers

Jonathan

--
Posted via CNET Help.com
http://www.help.com/

2. How Restore and backup Replication Database

3. THIS IS THE ONE ! - Sharp Techies Wanted

4. US-AK-APPS DEVELOPER

5. CLIENT SETUP USING TCP/IP

6. Here's one for you non-techies:

7. SQL7 Column-level constraints/filters possible?

8. THIS IS THE ONE ! - Sharp Techies Wanted

9. D3, jBASE and Universe techies.

10. San Francisco job for an 11 years Oracle techies

11. P9 One to Many or One to One?

12. -VB one-one-one tutoring