FIX: "Not Enough Storage is Available..." Error with ADOID: Q182423
|
When using the AppendChunk method of the ADODB.Recordset object, the following error occurs:
The error number returned is -2147024882 (0x8007000E).Not enough storage is available to complete this operation.
To work around this problem, use one of the following two methods:
This bug was corrected in ActiveX Data Objects (ADO), version 2.0.
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 "<DSN Name>", "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
Additional query words:
Keywords : kbADO150 kbADO150bug kbADO200 kbADO200bug kbADO200fix
Version : WINDOWS:1.5
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 14, 1999