469,358 Members | 1,659 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Anyone ever done a binary Stream.write??? How?

I am trying to write a binary stream from ASP (VBScript). No combination
seems to work:

set x=Server.CreateObject("ADODB.Stream")
x.open
x.type=1 ' binary
x.write ??????

No matter what I substitute for "????" (array, cbyte(0), string, etc.) I
get:

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

Does anyone have an example that works????

TIA,

Larry Woods

(Cross posted to microsoft.public.data.ado)
Jul 19 '05 #1
3 3842
I always use hhtpxml

url = http://www.voanews.com/index.cfm
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
tex = xmlhttp.responseText

response.write tex

"Larry Woods" <la***@NOSPAMlwoods.com> wrote in message
news:u#**************@tk2msftngp13.phx.gbl...
I am trying to write a binary stream from ASP (VBScript). No combination
seems to work:

set x=Server.CreateObject("ADODB.Stream")
x.open
x.type=1 ' binary
x.write ??????

No matter what I substitute for "????" (array, cbyte(0), string, etc.) I
get:

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

Does anyone have an example that works????

TIA,

Larry Woods

(Cross posted to microsoft.public.data.ado)

Jul 19 '05 #2
Sorry I wasn't clear, Slim.

I'm trying to write the binary to DISK.

Larry Woods

"Slim" <Slim@slim> wrote in message
news:OW**************@TK2MSFTNGP11.phx.gbl...
I always use hhtpxml

url = http://www.voanews.com/index.cfm
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
tex = xmlhttp.responseText

response.write tex

"Larry Woods" <la***@NOSPAMlwoods.com> wrote in message
news:u#**************@tk2msftngp13.phx.gbl...
I am trying to write a binary stream from ASP (VBScript). No combination seems to work:

set x=Server.CreateObject("ADODB.Stream")
x.open
x.type=1 ' binary
x.write ??????

No matter what I substitute for "????" (array, cbyte(0), string, etc.) I
get:

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

Does anyone have an example that works????

TIA,

Larry Woods

(Cross posted to microsoft.public.data.ado)


Jul 19 '05 #3
You need to convert the data to and from binary strings using the ChrB function
to convert and individual character to binary (on the write) and the MidB
function to convert it back (on the read).

I'm trying to write the binary to DISK.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

103 posts views Thread by Steven T. Hatton | last post: by
3 posts views Thread by Durand | last post: by
7 posts views Thread by Scott Meddows | last post: by
3 posts views Thread by Arun | last post: by
7 posts views Thread by smith4894 | last post: by
9 posts views Thread by Hatzigiannakis Nikos | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.