473,246 Members | 1,552 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

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 3979
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: lawrence | last post by:
I'm trying to read up on the rfc's that govern form inputs. Much of what I'm reading is stuff I didn't know before and some of it is alarming. This one left with me questions: ...
103
by: Steven T. Hatton | last post by:
27.4.2.1.4 Type ios_base::openmode Says this about the std::ios::binary openmode flag: *binary*: perform input and output in binary mode (as opposed to text mode) And that is basically _all_ it...
3
by: Durand | last post by:
How can I write/read a structure into a binary file? Thanks Durand
7
by: Scott Meddows | last post by:
I'm trying to serve a PDF file from a webpage so it will load in the browser.. Can anyone tell what is wrong with this code? I've tried everything Thanks Dim httpwreq As...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
7
by: smith4894 | last post by:
Hello all, I'm working on writing my own streambuf classes (to use in my custom ostream/isteam classes that will handle reading/writing data to a mmap'd file). When reading from the mmap...
4
by: FreewareGuy | last post by:
I want to add binary files to my VB 2005 executable to make a single exe with all the required files which I can extract at will through my code, how do I do this pls. guide o how to add binary...
9
by: Hatzigiannakis Nikos | last post by:
I have written the following code in DEV C++ but the produced file is a normal text file (you can type it in command line). I was expecting that the numeric values would have written in their...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.