BUG: "Not Enough Storage is Available..." Error with ADO

Last reviewed: March 16, 1998
Article ID: Q182423
The information in this article applies to:
  • ActiveX Data Objects (ADO), version 1.5

SYMPTOMS

When using the AppendChunk method of the ADO.Recordset object, the following error occurs:

   Not enough storage is available to complete this operation.

The error number returned is -2147024882 (0x8007000E).

RESOLUTION

To work around this problem use one of the following two methods:

  • Open an ADO.Connection object and set the CursorLocation property to adUseClient and use this connection with the ADO.Recordset.

    -or-

  • Use only one AppendChunk call and append all of the data with only one call to AppendChunk. Note that this restricts you to a maximum chunk size of 511818 bytes.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

The following sample code demonstrates the error when using Microsoft SQL Server as the database. If you uncomment the line indicated, the error no longer occurs.

Sample Code

   Sub ADOBlobFail()
     Dim conn As New ADODB.Connection
     Dim rs As New ADODB.recordset
     Dim bytBlock(256) As Byte
     Dim i As Long

     conn.Open "LocalServer", "sa", ""
     ' Uncomment the next line to avoid the error.
     ' conn.CursorLocation = adUseClient
     On Error Resume Next
     conn.Execute "drop table IMAGE1234"
     On Error GoTo 0
     conn.Execute "create table IMAGE1234 " & _
                  "( ID int primary key, DATA IMAGE )"
     rs.ActiveConnection = conn
     rs.Open "select * from IMAGE1234", , adOpenDynamic, _
             adLockOptimistic, adCmdText

     rs.AddNew
     rs.Fields(0).Value = 1
     For i = 1 To 1000
        rs.Fields(1).AppendChunk bytBlock
     Next i
     rs.Update

   End Sub

Keywords          : adoall ado15bug
Version           : WINDOWS:1.5
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbpending


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.