Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Re: ADODB.Stream object problems


Message #1 by mailjoachim@c... on Wed, 21 Aug 2002 23:29:05
In reply to:

> has anybody ever used the Stream.write method before. It supposed takes 
an 
> array of bytes as it's argument but I'm getting an error when I try this.
> 
> Here's a brief example:
> 
> Dim aStreamData
> Dim sData : sData = Request.BinaryRead(Request.ByteCount)
> ReDim aStreamData(LenB(sData))
> 
> For iIndex = 0 To UBound(aStreamData) - 1
> 
>    aStreamData(iIndex) = CByte(AscB(MidB(sData,iIndex + 1, 1)))
> 
> Next
> 
> Dim adostream: Set adostream = Server.CreateObject("ADODB.Stream")
> 
> adostream.Type = adTypeBinary
> Call adostream.Open
> Call adostream.Write(aStreamData)
> 
> I get an error saying:
> 
> ADODB.Stream error '800a0bb9' 
> 
> Arguments are of the wrong type, are out of acceptable range, or are in 
> conflict with one another.
> 
> I'm pretty sure that I've created the byte array properly, so what am I 
> doing incorrectly?
> 
> Thanks,
> 
> Tripp
> 

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

I'm experiencing exactly the same problem.

You wrote your message pretty long ago, but no answers were posted. 
Did you find the solution in the mean time? Can anybody help?

For the record: I'm using ADO 2.7 with the latest service packs installed 
(as of August 22, 2002). 

Thanx,

Joachim Kruyswijk

  Return to Index