PDA

View Full Version : Automating the insertion of an object



kbsudhir
01-15-2008, 02:55 PM
Hi All,

There is one datatype called OleObject in access. The field having this object can contain other files such as .jpg, .doc, .xls, .doc etc.

But we have to do it manually.

My question here is can we automate this, ex linking it to one folder and inserting all teh files in that OleObject field of the DB...?

If Yes, then Pleas eguide me regarding the same.

:banghead:

Thanks
Sudhir

orange
01-19-2008, 08:08 AM
Hi All,

There is one datatype called OleObject in access. The field having this object can contain other files such as .jpg, .doc, .xls, .doc etc.

But we have to do it manually.

My question here is can we automate this, ex linking it to one folder and inserting all teh files in that OleObject field of the DB...?

If Yes, then Pleas eguide me regarding the same.

:banghead:

Thanks
Sudhir
I found this link that may provide you some help.
http://www.ammara.com/articles/accesspictureole.html

stanl
01-19-2008, 01:29 PM
Using and ADO Stream is probably the most effective method. .02 Stan

http://www.aspfree.com/c/a/Database/ADOs-Stream-Object/

kbsudhir
10-16-2008, 05:55 PM
Guys,

I really need some help on this one. As I am still stuck.
I am able to select the file to upload but I do not know how to upload these file to the proper filed of the table.

:dunno :banghead: :help

Sudhir

orange
10-17-2008, 04:59 AM
Guys,

I really need some help on this one. As I am still stuck.
I am able to select the file to upload but I do not know how to upload these file to the proper filed of the table.

:dunno :banghead: :help

Sudhir

Please provide more info. What exactly are you trying to do? What have you tried so far?
This sounds like a new topic. Perhaps it should be a new thread.

kbsudhir
10-18-2008, 12:58 PM
Well Orange, I was doing my research & also studied the links which you & Stanl have kindly posted for my reference. But Unfortunately I am still stuck...!!!!! :-(

I have created a database where I am maintaining all the updates regarding my work. But I also have to update "Word documents" for some updates which are in manuals ans also the approval mail which I got along with them for future reference.

Hence I created two fields of OleObject Data type in my table.

I have created a form through which I am able to update the table but when it comes to update the manuals & mails I am just able to select them from their respective locations but not able update them to their repective filelds. I have used filedialog to select the file.

Any guidance as usual is appreciated.

Thanks
Sudhir

stanl
10-18-2008, 01:51 PM
We have provided the 2 methods for associating OLE Objects.

1. Embedded Links. Basically the Access menus allow you to do this. It associates the object with the application that displays it.

2. Directly place the object in the OLE field as binary data - something I prefer, because it makes the data completely portable. There are methods for appendchunk(), getchunk() - but an ADODB Stream is the quickest and most efficient. I provided a link.

Both links we provided were pretty specific as to how to and any code you would need to write. So, I don't understand what you say you don't understand:dunno .

I wrote an app last year that traversed the online business yellow pages for every bank in North Carolina, ran mapquest against the bank's location, processed the maps via HTTP Get directly into an ADO Stream and then into an Access OLE Binary field. It is really not that difficult.

kbsudhir
10-20-2008, 02:38 PM
Well Stanl, I will research still more & try to get back to you with specific areas I am getting stuck

Once again thank you very much
:bow:
Sudhir