tags:

views:

57

answers:

0

I have a dll with following code:

`Dim x As ADODB.Stream Dim strmAssembly As ADODB.Stream Dim strmReturnStream As ADODB.Stream Dim alLengths() As Long Dim abyteData() As Byte

Set x = New ADODB.Stream x.Type = adTypeBinary x.Open

Set strmAssembly = New ADODB.Stream strmAssembly.Type = adTypeBinary strmAssembly.Open

Set strmReturnStream = New ADODB.Stream strmReturnStream.Type = adTypeBinary strmReturnStream.Open

rsReportData.Save x, adPersistADTG

' Now transfer it into the assembly stream. x.Position = 0 strmAssembly.Write x.Read(-1)`

At this point x.Size = 154371436 and I get "not enough storage is available to complete this operation" error on x.Read(-1). There is pleanty of memory and storage and virtual memory is 7200 MB. Please help!