473,385 Members | 1,925 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,385 software developers and data experts.

How can i save BinaryRead string...

hi!
i have a situation here!

i want to save string from BinaryRead()method, so i write
a ASP code just like that!!

<%
dim binRead
dim byteCount

byteCount= Request.TotalBytes
binRead = Request.BinaryRead(byteCount)
Set objFSO = Server.CreateObject
("Scripting.FileSystemObject")
Set objTStream = objFSO.CreateTextFile("C:\aaaa.txt", True)
objTStream.WriteLine binRead
Set obj = Nothing
%>

objTStream.WriteLine binRead <-- is it right?

when i open "C:\aaaa.txt" there is no char! no string

what is wrong?

how can i save binary string?

please!! i need your help
Jul 19 '05 #1
2 8337
If it's truly binary data, I wouldn't expect to be able to see it properly
in a text app (like notepad for instance). Try debug (from a command
prompt).

I would also make sure byteCount <> 0 before writing the file - and use
Write() instead of WriteLine() too.

Mike
"garbriel" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
hi!
i have a situation here!

i want to save string from BinaryRead()method, so i write
a ASP code just like that!!

<%
dim binRead
dim byteCount

byteCount= Request.TotalBytes
binRead = Request.BinaryRead(byteCount)
Set objFSO = Server.CreateObject
("Scripting.FileSystemObject")
Set objTStream = objFSO.CreateTextFile("C:\aaaa.txt", True)
objTStream.WriteLine binRead
Set obj = Nothing
%>

objTStream.WriteLine binRead <-- is it right?

when i open "C:\aaaa.txt" there is no char! no string

what is wrong?

how can i save binary string?

please!! i need your help

Jul 19 '05 #2
"garbriel" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
hi!
i have a situation here!

i want to save string from BinaryRead()method, so i write
a ASP code just like that!!

<%
dim binRead
dim byteCount

byteCount= Request.TotalBytes
binRead = Request.BinaryRead(byteCount)
Set objFSO = Server.CreateObject
myChunk = Request.BinaryRead(byteCount)
Set myStream = CreateObject("ADODB.Stream")
myStream.Open
myStream.Type = 1 ' binary
myStream.Write(myChunk)
myStream.SaveToFile(yourfile)
myStream.Close
("Scripting.FileSystemObject")
Set objTStream = objFSO.CreateTextFile("C:\aaaa.txt", True)
objTStream.WriteLine binRead
Set obj = Nothing
%>

objTStream.WriteLine binRead <-- is it right?

when i open "C:\aaaa.txt" there is no char! no string

what is wrong?

how can i save binary string?

please!! i need your help


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roberto | last post by:
Sometimes when loading binary files with Request.BinaryRead IIS on the log gives me the following Error (I have analyzed IIS Log with Web Trend Analyzer and the error isn't frequent): POST...
2
by: Jamie Fryatt | last post by:
Just another quick one, the upload system im using obviously doesn't like request.form is there anything else i can use to pass the variable that wont give me the error shown below. thanks ...
1
by: Vince C. | last post by:
Hi. I'm trying to put upload results from an HTML form into an ADO stream. I thought I could code the following (JavaScript): var s = Server.CreateObject("ADODB.Stream"); s.Type =...
2
by: F. Nolet | last post by:
Hi, With IIS 6 - ASP : I try to upload a file of 125,000,000 bytes. To do it, I use this code : Request.BinaryRead(Request.TotalBytes) I get this error :
2
by: Arpan | last post by:
Under what circumstances can Request.BinaryRead() be useful & when should it be used? Assume that the value of Request.Form("anyvalue") is "a" (without the quotes). The output of <%...
0
by: SWu | last post by:
Hi all Could someone please tell me how to receive and save the PDF that gets submitted from an FDF form? DETAILS ====== The server has PDF forms (i.e. FDFs) which the user can browse to and...
2
by: Water Cooler v2 | last post by:
Just trying to experiment with the Request.BinaryRead(count) method. What's wrong with this script? <SCRIPT Language="VBScript" runat="server"> Dim b b =...
2
by: Griff | last post by:
Bizarre problem here.... I have a classic ASP web page that exists in one project. I have copied this code file into another web project and it errors! The code has not been altered in any...
0
skeptics
by: skeptics | last post by:
Trying to pass a SafeArray that i get form Request.BinaryRead Method in classic asp to a c# com interop component. In this thread i found a solution to pass and cast a normal asp safearray in to a c#...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.