Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > PBM: ADOStream.Write( Request.BinaryRead() ) causes an error

Reply
Thread Tools

PBM: ADOStream.Write( Request.BinaryRead() ) causes an error

 
 
Vince C.
Guest
Posts: n/a
 
      04-04-2004
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 = adTypeBinary;
s.Open();
s.Write( Request.BinaryRead() )

but it doesn't work and I get an error "Arguments of wrong type". IIS doc says
BinaryRead() returns an array of bytes. It also says that ADOStream.Write takes
an argument of type array of bytes... So what are the types that are so wrong
that I get such an error?

Is there a way to put directly the received array of bytes into an ADO stream?

Thanks for any hint/suggestion,
Vince C.


 
Reply With Quote
 
 
 
 
Vince C.
Guest
Posts: n/a
 
      04-04-2004
Posted too quickly...

s.Write( Request.BinaryRead(Request.TotalBytes) )

is far, far better

Vince C.

------

"Vince C." <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
[...]
> s.Write( Request.BinaryRead() )

[...]


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error With Bound Control Causes redirection to 404 Error page instead of displaying error Bishop ASP .Net 1 02-24-2007 09:42 PM
Linksys adaptor causes system error =?Utf-8?B?TlZva2Vz?= Wireless Networking 1 10-03-2005 05:04 PM
RemoteOnly error mode causes error Paul Davies ASP .Net Web Services 1 03-29-2005 05:33 PM
Thunderbird Forwarded Mail Causes Fatal Error Gregg Firefox 0 02-19-2005 02:18 PM
Postback causes 100=Continue, causes double download prompt? Xavier Osa ASP .Net 0 01-09-2004 11:17 AM



Advertisments