Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT--OLE object in Query

Status
Not open for further replies.

Susie

MIS
May 8, 2001
20
US
Hi,

I'm on a deadline for a project and I'm running into a big problem. I've got to find a solution to this quickly.

I have a database that is used to produce renewal notices for a publication. I have a table of Renewal Text records. One field is an OLE object field linked to a Word document containing text.

I have a make-table query matching up customer records with the appropriate Renewal Text record.

Here's the problem. There are 25,000 customer records. The Word documents are fairly small each, 37KB. If I run the make-table query in datasheet mode, it takes a few seconds to come up on my screen. But if I actually run it to make a table, it takes forever, the database gets bigger and bigger, and I get an error which says "database has reached maximum size." It is 999,999 or so.

Any ideas? If I remove the OLE object from the query, it runs quickly so this is where the problem lies. If the OLE object is supposed to be linked, why does the database get so large? It almost seems like it is embedded instead, but if I unmap the drive pointing to the Word document, it tells me Object cannot be found for the Word document in the table, so I know it must be linked.

Help!!!
TIA, Susie [sig][/sig]
 
It would appear that it is infact embedding it becasue it gets so big and then bombs out.
Try making the table without the OLE object then try merging it after the fact.
Where are the objects? Inside a Word document?

Maybe you can link them using VBA code later.

Of I have left the image s on th edrive and then used this code to load them only when they are needed.

Private Sub Form_Current()
If Me![ID] <> 0 Then
Me!Image14.Picture = &quot;p:\ViewPhotos\Photos\&quot; & Me![ID] & &quot;.jpg&quot;
Label20.Caption = &quot;File: &quot; & &quot; p:\ViewPhotos\Photos\&quot; & Me![ID] & &quot;.jpg&quot;
End If

End Sub

[sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
Hi,

Do you happen to know the syntax for updating the field to be an OLE object? I've gotten this far:

Dim mydb As Database
Dim itemset As Recordset
Set mydb = CurrentDb
Set itemset = mydb.OpenRecordset(&quot;t_test&quot;) 'Create dynaset.
itemset.MoveFirst ' Find first occurrence
Do Until itemset.EOF
itemset.Edit
itemset![LinkedDocument] = ???
itemset.Update
itemset.MoveNext
Loop

I'm not sure what to replace ??? with to put a document there. I want to link c:\pbs\textinvgift3.doc but don't know how to link the document in this field instead of the text &quot;c:\pbs\textinvgift3.doc&quot; Any suggestions?
Thanks, Susie [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top