Microsoft KB Archive/132028

= ACC2: Errors Using Large OLE Objects with MS SQL Server Tables =

Article ID: 132028

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q132028



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you use large OLE objects (greater than about 400K) with Microsoft SQL Server tables, you may encounter the following problems. If you insert the OLE object into an attached Microsoft SQL Server table, you receive the following two error messages:

 

ODBC call failed

 

The insert/update of a text or image column(s) did not succeed.



When you export a table containing a large OLE object to a Microsoft SQL Server table, you receive the following error message

Errors were encountered copying data: The contents of fields in x records were deleted and 0 record(s) were lost due to key violations. Proceed anyway?

and the OLE object is truncated.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.



Steps to Reproduce Problem
  Create a table in Microsoft Access with the following structure:

     Table: TestExport -     Field Name: Field1 Data Type: Text Indexed: Yes (No Duplicates) Field Name: Field2 Data Type: OLE Object  Export the TestExport table to Microsoft SQL Server.</li>  Create a unique index on the TestExport's Field1 field using an SQL pass-through query with the following syntax:

<pre class="fixed_text">     create unique index TestExport_Ind on TestExport(Field1) </li> Attach to the TestExport table on Microsoft SQL Server.</li> Open the attached TestExport table in Datasheet view.</li> In the first record, type any text value in the Field1 field, and then move the mouse pointer to the Field2 field.</li> On the Edit menu, click Insert Object.</li> In the Insert Object box, click the Insert From File option button, and then enter a path to a file containing an OLE object larger than 400K.</li> Move the mouse pointer to the second record. Note that when Microsoft Access tries to save the first record, you receive the following error messages:

ODBC call failed.

the insert/update of a text or image column(s) does not succeed.

</li></ol>

<div class="references_section">