By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,417 Members | 1,825 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,417 IT Pros & Developers. It's quick & easy.

using ADODB.stream to get results from a url query

P: n/a
Hi,

I have an asp page that needs to display the string that is returned from a
cgi file.

As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to a
browser, it will display YES or NO

I need to have my asp code query this url, get the resulting string, then
act upon it (basically use the answer to display a nice big tick or a big
cross).

I have been told that I can do it using ADODB.STREAM, but the code I have
found doesnt work no matter what i do

<!--#include file="adovbs.inc"-->
<%
dim theNumber
dim TheUrl
dim TheResponse
dim Ostream
theNumber=request.form("phone")
theUrl="http://mydomain/cgifile.cgi?" & theNumber
set oStream = server.CreateObject("ADODB.Stream")
oStream.Type = adTypeText
oStream.Charset = "ascii"
oStream.Open "URL=" & theurl, admoderead, 8
oStream.Position = 0
TheResponse=oStream.ReadText
response.redirect("result.asp?result=" & TheResponse)
%>

The ADOVBS.INC file resides in the same folder as this script.

Now, we mainly get this error;

ADODB.Stream error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/formhandler.asp, line 12
Line 12 being the .open line.

No matter what we do, we can't get it working.

My questions are
a) is this the correct way of doing what i need to do ??

b) If it is the correct way, why oh why isnt it working ?

We are running IIS5 Win2k

Thanks

--
________________________________________________
ADSSupport.net
http://www.adssupport.net
Dedicated free Active Directory ServicesT support

email: oliver.marshall@no****@adssupport.net
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Why don't you parse the results using XMLHTTP.
http://www.aspfaq.com/2173

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Harry Hudini" <harry.hudini@no****@simplicity.co.uk> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Hi,

I have an asp page that needs to display the string that is returned from a cgi file.

As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to a
browser, it will display YES or NO

I need to have my asp code query this url, get the resulting string, then
act upon it (basically use the answer to display a nice big tick or a big
cross).

I have been told that I can do it using ADODB.STREAM, but the code I have
found doesnt work no matter what i do

<!--#include file="adovbs.inc"-->
<%
dim theNumber
dim TheUrl
dim TheResponse
dim Ostream
theNumber=request.form("phone")
theUrl="http://mydomain/cgifile.cgi?" & theNumber
set oStream = server.CreateObject("ADODB.Stream")
oStream.Type = adTypeText
oStream.Charset = "ascii"
oStream.Open "URL=" & theurl, admoderead, 8
oStream.Position = 0
TheResponse=oStream.ReadText
response.redirect("result.asp?result=" & TheResponse)
%>

The ADOVBS.INC file resides in the same folder as this script.

Now, we mainly get this error;

ADODB.Stream error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/formhandler.asp, line 12
Line 12 being the .open line.

No matter what we do, we can't get it working.

My questions are
a) is this the correct way of doing what i need to do ??

b) If it is the correct way, why oh why isnt it working ?

We are running IIS5 Win2k

Thanks

--
________________________________________________
ADSSupport.net
http://www.adssupport.net
Dedicated free Active Directory ServicesT support

email: oliver.marshall@no****@adssupport.net

Jul 19 '05 #2

P: n/a
Tried that, but get loads of XML strings returned and me and XML dont get
on.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
Why don't you parse the results using XMLHTTP.
http://www.aspfaq.com/2173

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Harry Hudini" <harry.hudini@no****@simplicity.co.uk> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Hi,

I have an asp page that needs to display the string that is returned from
a
cgi file.

As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to

a browser, it will display YES or NO

I need to have my asp code query this url, get the resulting string, then act upon it (basically use the answer to display a nice big tick or a big cross).

I have been told that I can do it using ADODB.STREAM, but the code I have found doesnt work no matter what i do

<!--#include file="adovbs.inc"-->
<%
dim theNumber
dim TheUrl
dim TheResponse
dim Ostream
theNumber=request.form("phone")
theUrl="http://mydomain/cgifile.cgi?" & theNumber
set oStream = server.CreateObject("ADODB.Stream")
oStream.Type = adTypeText
oStream.Charset = "ascii"
oStream.Open "URL=" & theurl, admoderead, 8
oStream.Position = 0
TheResponse=oStream.ReadText
response.redirect("result.asp?result=" & TheResponse)
%>

The ADOVBS.INC file resides in the same folder as this script.

Now, we mainly get this error;

ADODB.Stream error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/formhandler.asp, line 12
Line 12 being the .open line.

No matter what we do, we can't get it working.

My questions are
a) is this the correct way of doing what i need to do ??

b) If it is the correct way, why oh why isnt it working ?

We are running IIS5 Win2k

Thanks

--
________________________________________________
ADSSupport.net
http://www.adssupport.net
Dedicated free Active Directory ServicesT support

email: oliver.marshall@no****@adssupport.net


Jul 19 '05 #3

P: n/a
What are you talking about? Did you try any of the examples in the article
I posted? You hit a web page, parse the HTML that's sent as a response.
Nothing about XML there at all, it's just piggybacking on an object whose
primary purpose is to process XML.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Harry Hudini" <harry.hudini@no****@simplicity.co.uk> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
Tried that, but get loads of XML strings returned and me and XML dont get
on.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
Why don't you parse the results using XMLHTTP.
http://www.aspfaq.com/2173

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Harry Hudini" <harry.hudini@no****@simplicity.co.uk> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Hi,

I have an asp page that needs to display the string that is returned from
a
cgi file.

As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to
a browser, it will display YES or NO

I need to have my asp code query this url, get the resulting string, then act upon it (basically use the answer to display a nice big tick or a big cross).

I have been told that I can do it using ADODB.STREAM, but the code I have found doesnt work no matter what i do

<!--#include file="adovbs.inc"-->
<%
dim theNumber
dim TheUrl
dim TheResponse
dim Ostream
theNumber=request.form("phone")
theUrl="http://mydomain/cgifile.cgi?" & theNumber
set oStream = server.CreateObject("ADODB.Stream")
oStream.Type = adTypeText
oStream.Charset = "ascii"
oStream.Open "URL=" & theurl, admoderead, 8
oStream.Position = 0
TheResponse=oStream.ReadText
response.redirect("result.asp?result=" & TheResponse)
%>

The ADOVBS.INC file resides in the same folder as this script.

Now, we mainly get this error;

ADODB.Stream error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are

in conflict with one another.
/formhandler.asp, line 12
Line 12 being the .open line.

No matter what we do, we can't get it working.

My questions are
a) is this the correct way of doing what i need to do ??

b) If it is the correct way, why oh why isnt it working ?

We are running IIS5 Win2k

Thanks

--
________________________________________________
ADSSupport.net
http://www.adssupport.net
Dedicated free Active Directory ServicesT support

email: oliver.marshall@no****@adssupport.net



Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.