如何从ASP中的ADODB流中读取数据作为字节值?

时间:2010-05-03 05:46:19

标签: asp-classic ado jscript

我有一个ASP例程,它获取二进制文件的内容并将其写入流。目的是从流中读取它并在服务器上处理它。

所以我有:

ResponseBody = SomeRequest (SomeURL) ;

var BinaryInputStream = Server.CreateObject ("ADODB.Stream") ;
BinaryInputStream.Type = 1 ; // binary
BinaryInputStream.Open ;
BinaryInputStream.Write (ResponseBody) ;
BinaryInputStream.Position = 0 ;

var DataByte = BinaryInputStream.Read (1) ;

Response.Write (typeof (DataByte)) ; // displays "unknown"

如何获取刚刚从流中读取的字节的字节值?

Asc()和byte()不起作用(JScript)

TIA

1 个答案:

答案 0 :(得分:0)

我绝望地再次问这个问题并解决了这个问题。见Getting access to a binary response byte-by-byte in classic asp/JScript