Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Conversion / January 2004

Tip: Looking for answers? Try searching our database.

How to import ole fields to a SQL Server db

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roberto Cerulli - 27 Jan 2004 08:01 GMT
Hi, I have an access db. In a table  I have an ole field where I have lots
of Word Docs stored.
I need to pass all the Access database data to a new SQL Server database,
but I have a problem, the word docs... It seems that Access put an header to
the docs stored in its ole field, but I can't find it.
Anyone can help me?
Thank you in advance
Roberto Cerulli
John Nurick - 27 Jan 2004 20:39 GMT
Hi Roberto,

Yes, documents stored in an Access OLE field don't consist just of the
contents of the file but also include a wrapper with information about
the parent application of the document and usually a preview image.

I don't know any way of stripping the file contents out of the wrapper
other than by saving it back to disk (from where you would import it to
the SQL server blob field).

For Word documents the only way I know of doing this is to automate an
Access form containing a ObjectFrame control bound to the OLE field to
fire up Word, activate the embedded document and Save As. (For bitmaps,
Stephen Lebans has written procedures to do this much more elegantly:
www.lebans.com.) It would probably be worth searching at
http://groups.google.com/advanced_group_search in case there is a better
way.

>Hi, I have an access db. In a table  I have an ole field where I have lots
>of Word Docs stored.
[quoted text clipped - 4 lines]
>Thank you in advance
>Roberto Cerulli

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Roberto Cerulli - 28 Jan 2004 15:42 GMT
Hi John,
Thank you, I used the same routine used by lebans, adapted for word docs:
I get the recordset, then for each record I pass the ole field word doc to
an OLE control Bound. Then I copy the OLE Control Bound content, open a new
word document, paste into it what I have copied and save the document with
the save as using the id of the record as the namen of the doc.
I have a problem, it copy only the first page of the document so I loose the
other pages. Do you know why?
Thank you,
Roberto Cerulli

> Hi Roberto,
>
[quoted text clipped - 27 lines]
>
> Please respond in the newgroup and not by email.
John Nurick - 28 Jan 2004 19:16 GMT
Hi Roberto,

Do the Word documents you create this way contain the first page of the
document, or *a picture of the first page*?

As far as I know you have to actually activate the OLE object - in this
case the embedded Word document - by manipulating (via VBA code) the
Verb and Action properties of the ObjectFrame control. E.g. set Verb to
acOLEVerbOpen and then Action to acOLEActivate. This opens the embedded
document in Word, and saving to disk will then produce a normal Word
file of the embedded document.

>Hi John,
>Thank you, I used the same routine used by lebans, adapted for word docs:
[quoted text clipped - 40 lines]
>>
>> Please respond in the newgroup and not by email.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.