473,503 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7844
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
2424
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
11748
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
8000
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
5209
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
2465
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
2128
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
2561
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
3455
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
3925
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
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.