How to transfer OLE Objects in Access to other DBs 
Author Message
 How to transfer OLE Objects in Access to other DBs

In MS Access, there is a data type "OLE Object" which can store image.  In
VB6 programs, how to read from Access and transfer the records with OLE
Object column to other kind of databases (i.e. Oracle/Sybase/SQLBase/...)?
I knew that Oracle use LONG RAW for image while SQLBase use LONG VARCHAR for
image.  Do we need to carry out any conversion?  Or by what means can I do
so?

Regards,
Anthony



Sat, 07 May 2005 15:03:04 GMT  
 How to transfer OLE Objects in Access to other DBs
Anthony

Try the following
You can read the image into a variant in VB and transfer it to any database
In ADO
Dim varImage As Variant

varImage=ORec.Fields("Imagefield').GetChunk (Number of Bytes)

or

varImage=ORec.Fields("Imagefield').Value

Sukesh


Quote:
> In MS Access, there is a data type "OLE Object" which can store image.  In
> VB6 programs, how to read from Access and transfer the records with OLE
> Object column to other kind of databases (i.e. Oracle/Sybase/SQLBase/...)?
> I knew that Oracle use LONG RAW for image while SQLBase use LONG VARCHAR
for
> image.  Do we need to carry out any conversion?  Or by what means can I do
> so?

> Regards,
> Anthony



Sat, 07 May 2005 16:42:02 GMT  
 How to transfer OLE Objects in Access to other DBs
You can use ADO's getchunk method to retrieve the data from the Access
database, however, there will be a OLE header before the actural image
data, the length for the database is determined by the OLE object's type. A
work around is to bind the filed to the a picturebox, save the image in the
picture box as a JPG file and then save the JP file to the target database.

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Sun, 08 May 2005 15:52:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to transfer OLE Objects in Access to other DBs

2. Storing an OLE object into Access OLE access

3. Linking or Embedding an OLE object into an Access OLE DataType Field using DAO

4. Linking or Embedding an OLE Object in an Access OLE DataType Field using DAO

5. Insertion of OLE-Object into OLE-Field of Access-Table

6. storing an OLE object into an Access OLE field

7. VBA-assigning an OLE-object to an Ole-object-field

8. Accessing OLE Objects from Access DB

9. Accessing OLE Object in Access from VB

10. Linking Access Tables in Different *.mdb Files, Populating an Access Table From Several Others

11. Linking Access Tables in Different *.mdb Files, Populating an Access Table From Several Others

12. OLE Access Excel (Datenimport von Excel in Access - muss nicht OLE sein)

 

 
Powered by phpBB® Forum Software