'And'ing A Byte Value - How?
I get a TYPE MISMATCH complaint fm ASP when I do the following in
trying to extract the high-order four bits. The complaint being that the
strTemp value is a string. Well, yes - it's a 1-char string.
NumTemp = MidB(strTemp,1, 1) And &Hf0
What am I doing wrong? (Something dumb, I'm sure, but ... .)
View Replies
ADVERTISEMENT
I am now going a step further in asp trying to understand how asp browser upload scripts work. Looking at a couple of browser upload script, I unfortunatly constated that I really don't know nothing about "bytes". This is an obscure area to me. I consider bytes only a measure unit.
What are exactly bytes? If there is no way for visualizing them, then what can they be compared to? numeric values? any good article about this?
View Replies
View Related
I have a byte array containing the data of an image file (for example gif) in my asp code. How can I display it on the website? No image file exists on the disk. Is it possible to update a div field? What should I put there?
Please tell me there is another solution than writing the image to a file and then load it into the page, it's a real time application and speed is very important here.
View Replies
View Related
I am getting byte array from COM to ASP page like this, This array is having DOCUMENT Image from Database.
set objData = CreateObject("MemoService.FileAttachement")
bRet = objData.GetAttachedDocument(strClipID)
Here, bRet contains byte array. When I try to open that document using
response.BinaryWrite bRet
I am not able to open the file in the browser. It is writing only the file name (for ex. c: emp.doc)
View Replies
View Related
I need access to the bits of a Byte expression and the logical functions operatge bit-wise on numeric vales - per the VBScript CHM.
So how do I convert a Byte to its numeric value?
View Replies
View Related
How do I do that? This is for some bit-diddling, but the logical functions like AND require numeric expressions, per the book.
View Replies
View Related
I am trying to use ServerXMLHTTP to post data containing Japanese
characters, but the data posts as question marks, boxes or just random ascii
characters. Here is the code I am using:
View Replies
View Related
I want to convert the binary data to string. I tried doing the same using following peace of code.
Function SimpleBinaryToString(Binary)
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1)))
Next
SimpleBinaryToString = S
End Function
It works fine when the data is English. But when the binary data contains some Japanese characters the resultant string gets corrupted.
View Replies
View Related
A site Im working with has an API that allows one to retrieve files.
The file is a Word doc sent as a byte stream.
url="blah.asp?fileid=777777"
set oXMLHTTP=server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
oXMLHTTP.open "POST",url,false
oXMLHTTP.send
binData=oXMLHTTP.responseText
I am trying to save the stream as a file on the Web server. It isn't
working. I've tried using FS.OpenTextFile, Stream.Write, etc.
Nothing is working.
Anyone have any sample code on how to do this?
View Replies
View Related
In dreamweaver using javascript I've developed a page that sends the form's contents via Jmail to the user. It works fine until i try to send double byte characters(i.e. japanese). It sends the email but once i open it up in a mail client the text is illegible. My mail server and mail client never has problems sending and recieving double byte characters, the only time this problem pops up is when i send an email from an ASP page via Jmail. I've tried sending the email in plain text and html but it hasn't made any difference. Here is the code I've been using: .....
View Replies
View Related
I moved ASP WebPages from Windows 2000 server to Windows 2003 server platform. Those double-byte characters (Japanese) retrieved from SQL server 2000 are corrupted.
I am using Macromedia Dreamweaver MX as the development tool, by encoding webpage as "UTF-8" as the following, <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I also add
<%
Response.CodePage = "65001"
Response.Charset="utf-8"
%>
into my ASP page. But it does not solve the problem.
My ASP pages are working perfectly in Windows 2000 server, but they are not working on Windows 2003 server (Web edition & Enterprise Edition).
Is there anyone encountered the similar problems before ? I research the Microsoft website, no any answers on that.
View Replies
View Related
I am near to desperation as I have a million things to get a solution
for my problem. I have to post a multipart message to a url that
consists of a xml file and an binary file (pdf). Seperately the
posting words fine but when I want to create one multipart message
with both then things go wrong.
The binary file is converted and of datatype byte()
The xml file is just a string.
I don't know how to merge these two into the multipart message. I have
tried converting the binary to string and then concatenate but that
doesn't work as it seems to leave off the last part of the file and
the boundary.
View Replies
View Related
I'm using Msxml2.ServerXMLHTTP.3.0 to fetch a HTML page on a remote
server. The fetched page is then parsed and the information of interest
is extracted and send to the client browser.
However, the remote server does not specify any character coding in its
headers. If using ResponseText property in ServerXMLHTTP, some
international characters are not decoded correctly. This is due to
ResponseText assuming UTF-8 coding if no character set is specified.
My solution is to use the ResponseBody property which returns the web
page as an array of unsigned bytes. I then convert the data to a string
using the ADODB.Stream method as described here:
http://www.motobit.com/tips/detpg_binarytostring/
The string is then parsed and the required information is pulled out.
This solution works just fine but I wonder if there is some more
efficient (without the need for a byte to string converion) way to
solve the problem.
View Replies
View Related
I can convert an image that is retrieved from a FileUpload object into a byte array and insert it into the database..
When the user signs-up i wish tosimply insert into the Picture (DB Type = Image) field to an image i already have saved in my images folder?
Anyone know of a way to do this? Tutorials, articles or advise??!
View Replies
View Related