H
Harry Hudini
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@[email protected]
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@[email protected]