LoadFromStream

TeeChart for ActiveX, COM and ASP
Post Reply
Zoe@Oblicore
Newbie
Newbie
Posts: 12
Joined: Fri Nov 15, 2002 12:00 am

LoadFromStream

Post by Zoe@Oblicore » Wed Apr 14, 2004 3:48 pm

Hi,

I'm trying to work with LoadFromStream method but it fails.
Does it requires a special data format ?

I'm feeding it with xmlhttp.responseStream. There's no error but no chart either.
Here is the code:
set objXmlHttp = CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "POST","/Applets/TeeChart/TeeFromWeb.asp?userid=100&teePath=path,false
objXmlHttp.send
objTChart.Import.LoadFromStream objXmlHttp.responseStream
set objXmlHttp = nothing

The thing works only like this:
objTChart.Import.LoadFromURL "http://xx/Applets/TeeChart/TeeFromWeb.a ... ePath=path

The TeeFromWeb.asp successfully reads the tee file as binary data. It returns the data with Response.binaryWrite.

Do I have to convert objXmlHttp.responseStream to some array ? How do I do that in VBScript
and JavaScript ?

Thanks for your help,
Ofer.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Apr 15, 2004 9:04 am

Hi --
The TeeFromWeb.asp successfully reads the tee file as binary data. It returns the data with Response.binaryWrite.

Do I have to convert objXmlHttp.responseStream to some array ? How do I do that in VBScript
and JavaScript ?
Mmm ... have a look at "Getting Binary Data" on:
http://www.4guysfromrolla.com/webtech/110100-1.shtml

Maybe using syntax similar to:

Code: Select all

objTChart.Import.LoadFromStream Response.binaryWrite(objXmlHttp.responseBody)
will work for you ...
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply