ADODB.Stream

J

JohnWayne

Hello All,

I am trying to use ADODB.Stream , to write a graphic to the asp page.
However I cannot seem to send my byte Array to the objStream.Write
(mybyteArray)

Does anyone know how to convert the byte array to binary data that the Write
method will accept ?? As it always returns:
Error Type:
"Microsoft VBScript runtime (0x800A000D)"
"Type mismatch"

I am trying to get away from using a DLL, and write a file (image data) to
the os, and use a total server side solution. As the file is created using
the following in the DLL:
Open strFileName For Binary As nF
Put nF, , bytHdr()
Put nF, , bytRaster()
Close nF

Thanks
Joey

Example Code Server Code:
Dim adoStream
Set adoStream = Server.CreateObject("ADODB.Stream")

adoStream.Type = adTypeBinary
adoStream.Open
adoStream.Write mbytHdr - error 0x800A000D

Response.binarywrite adoStream.Read

Set adoStream = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top