473,372 Members | 853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

using ADODB.stream to get results from a url query

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
3 7834
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ian.H | last post by:
Hi all, I've taken on a massive project for a client recently and now I've hit some bug fixes that are required (3rd party code). and was just wondering about peoples opinions / personal...
9
by: shank | last post by:
Per a previous suggestion, I'm trying to use a parametized query in Access 2002. The query functions properly in Access. Now I'm trying to call it from ASP. I'm using code I found at...
3
by: Me | last post by:
hi, I have this file I need to execute from an ASP client. since we have installed it on the SQL Database server machine, I thought I could run it like this: Set Cn =...
1
by: guyv | last post by:
Hello! I wanna read binary data from database with ADODB.Stream object. So I wrote code.. --------- <% query = "SELECT * FROM Categories" adoDB.DefaultDatabase = "Northwind"
0
by: Channing Jones | last post by:
Hello everyone, I am trying to store data in a binary field of an SQL-Server table using ADODB. So far, I have managed to store a record but not any data in the binary field. I only get...
6
by: CFW | last post by:
References in Access and .mdb files have always been painful for me - just when I thought I was OK in an .mdb, I have a .adp I'm working on and I need to use Set db as CurrentDb - Constant "object...
8
by: FS Liu | last post by:
Hi, I am writing ATL Service application (XML Web service) in VS.NET C++. Are there any sample programs that accept XML as input and XML as output in the web service? Thank you very much.
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, The following code was suggested by one of the users in this newsgroup when a pdf file was requested by a user from an asp page. I used the similar code in my page and the very interesting...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.