Using an ADO stream to retrieve xml data from remote website

Using an ADO stream to retrieve xml data from remote website

Post by peter_ecc.. » Wed, 31 Jan 2001 11:36:30



Im using ASP and ADO2.6 to try and retrieve a XML file held on a
remote web server.  I believe I can use an ado stream to do this, but
things are not going too well. At a very basic level should the 2 lines
of code below work?

Set stream = Server.CreateObject("ADODB.Stream")
stream.Open "url=http://MyServer/ITR.XML"

When I try this I get:

Error Type:
Microsoft OLE DB Service Components (0x80040E09)
Permission denied.
/test.asp, line 3

Im using the Wrox ADO 2.6 book as reference (but I think Ive miss-
read something <g>)

Sent via Deja.com
http://www.deja.com/

 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by Carl Prothma » Wed, 31 Jan 2001 13:44:07


You need to pass in a Username and Password that has permissions to
http://MyServer

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com


Quote:> I'm using ASP and ADO2.6 to try and retrieve a XML file held on a
> remote web server.  I believe I can use an ado stream to do this, but
> things are not going too well. At a very basic level should the 2 lines
> of code below work?

> Set stream = Server.CreateObject("ADODB.Stream")
> stream.Open "url=http://MyServer/ITR.XML"

> When I try this I get:

> Error Type:
> Microsoft OLE DB Service Components (0x80040E09)
> Permission denied.
> /test.asp, line 3

> I'm using the Wrox ADO 2.6 book as reference (but I think I've miss-
> read something <g>)

> Sent via Deja.com
> http://www.deja.com/


 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by peter_ecc.. » Thu, 01 Feb 2001 01:58:01


I tried that, with no luck, but I differnt error message.

Set stream = Server.CreateObject("ADODB.Stream")
stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
adModeRead, "username","password"

I now get:

Error Type:
ADODB.Stream (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/test.asp, line 3

If I leave out adOpenStreamUnspecified and adModeRead and try:

Set stream = Server.CreateObject("ADODB.Stream")
stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

I get:

Error Type:
Microsoft OLE DB Service Components (0x80004005)
Unspecified error
/test.asp, line 3

I'm I being really dumb here?



> You need to pass in a Username and Password that has permissions to
> http://MyServer

> --

> Thanks,
> Carl Prothman
> Microsoft Visual Basic MVP
> http://www.able-consulting.com



> > I'm using ASP and ADO2.6 to try and retrieve a XML file held on a
> > remote web server.  I believe I can use an ado stream to do this,
but
> > things are not going too well. At a very basic level should the 2
lines
> > of code below work?

> > Set stream = Server.CreateObject("ADODB.Stream")
> > stream.Open "url=http://MyServer/ITR.XML"

> > When I try this I get:

> > Error Type:
> > Microsoft OLE DB Service Components (0x80040E09)
> > Permission denied.
> > /test.asp, line 3

> > I'm using the Wrox ADO 2.6 book as reference (but I think I've miss-
> > read something <g>)

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/
 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by Carl Prothma » Thu, 01 Feb 2001 02:20:22


Do you have the following constants defined in your code (or a reference to
the ADO library)?
    adOpenStreamUnspecified
    adModeRead

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com


> I tried that, with no luck, but I differnt error message.

> Set stream = Server.CreateObject("ADODB.Stream")
> stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
> adModeRead, "username","password"

> I now get:

> Error Type:
> ADODB.Stream (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
> /test.asp, line 3

> If I leave out adOpenStreamUnspecified and adModeRead and try:

> Set stream = Server.CreateObject("ADODB.Stream")
> stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

> I get:

> Error Type:
> Microsoft OLE DB Service Components (0x80004005)
> Unspecified error
> /test.asp, line 3

> I'm I being really dumb here?



> > You need to pass in a Username and Password that has permissions to
> > http://MyServer

> > --

> > Thanks,
> > Carl Prothman
> > Microsoft Visual Basic MVP
> > http://www.able-consulting.com



> > > I'm using ASP and ADO2.6 to try and retrieve a XML file held on a
> > > remote web server.  I believe I can use an ado stream to do this,
> but
> > > things are not going too well. At a very basic level should the 2
> lines
> > > of code below work?

> > > Set stream = Server.CreateObject("ADODB.Stream")
> > > stream.Open "url=http://MyServer/ITR.XML"

> > > When I try this I get:

> > > Error Type:
> > > Microsoft OLE DB Service Components (0x80040E09)
> > > Permission denied.
> > > /test.asp, line 3

> > > I'm using the Wrox ADO 2.6 book as reference (but I think I've miss-
> > > read something <g>)

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/

 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by peter_ecc.. » Thu, 01 Feb 2001 03:28:28


yep, I even tried the numeric values.



> Do you have the following constants defined in your code (or a
reference to
> the ADO library)?
>     adOpenStreamUnspecified
>     adModeRead

> --

> Thanks,
> Carl Prothman
> Microsoft Visual Basic MVP
> http://www.able-consulting.com



> > I tried that, with no luck, but I differnt error message.

> > Set stream = Server.CreateObject("ADODB.Stream")
> > stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
> > adModeRead, "username","password"

> > I now get:

> > Error Type:
> > ADODB.Stream (0x800A0BB9)
> > Arguments are of the wrong type, are out of acceptable range, or
are in
> > conflict with one another.
> > /test.asp, line 3

> > If I leave out adOpenStreamUnspecified and adModeRead and try:

> > Set stream = Server.CreateObject("ADODB.Stream")
> > stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

> > I get:

> > Error Type:
> > Microsoft OLE DB Service Components (0x80004005)
> > Unspecified error
> > /test.asp, line 3

> > I'm I being really dumb here?



> > > You need to pass in a Username and Password that has permissions
to
> > > http://MyServer

> > > --

> > > Thanks,
> > > Carl Prothman
> > > Microsoft Visual Basic MVP
> > > http://www.able-consulting.com



> > > > I'm using ASP and ADO2.6 to try and retrieve a XML file held on
a
> > > > remote web server.  I believe I can use an ado stream to do
this,
> > but
> > > > things are not going too well. At a very basic level should the
2
> > lines
> > > > of code below work?

> > > > Set stream = Server.CreateObject("ADODB.Stream")
> > > > stream.Open "url=http://MyServer/ITR.XML"

> > > > When I try this I get:

> > > > Error Type:
> > > > Microsoft OLE DB Service Components (0x80040E09)
> > > > Permission denied.
> > > > /test.asp, line 3

> > > > I'm using the Wrox ADO 2.6 book as reference (but I think I've
miss-
> > > > read something <g>)

> > > > Sent via Deja.com
> > > > http://www.deja.com/

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/
 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by Carl Prothma » Thu, 01 Feb 2001 03:47:45


How was the XML created?  Via the Recordset's Save method?


> yep, I even tried the numeric values.



> > Do you have the following constants defined in your code (or a
> reference to
> > the ADO library)?
> >     adOpenStreamUnspecified
> >     adModeRead

> > --

> > Thanks,
> > Carl Prothman
> > Microsoft Visual Basic MVP
> > http://www.able-consulting.com



> > > I tried that, with no luck, but I differnt error message.

> > > Set stream = Server.CreateObject("ADODB.Stream")
> > > stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
> > > adModeRead, "username","password"

> > > I now get:

> > > Error Type:
> > > ADODB.Stream (0x800A0BB9)
> > > Arguments are of the wrong type, are out of acceptable range, or
> are in
> > > conflict with one another.
> > > /test.asp, line 3

> > > If I leave out adOpenStreamUnspecified and adModeRead and try:

> > > Set stream = Server.CreateObject("ADODB.Stream")
> > > stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

> > > I get:

> > > Error Type:
> > > Microsoft OLE DB Service Components (0x80004005)
> > > Unspecified error
> > > /test.asp, line 3

> > > I'm I being really dumb here?



> > > > You need to pass in a Username and Password that has permissions
> to
> > > > http://MyServer

> > > > --

> > > > Thanks,
> > > > Carl Prothman
> > > > Microsoft Visual Basic MVP
> > > > http://www.able-consulting.com



> > > > > I'm using ASP and ADO2.6 to try and retrieve a XML file held on
> a
> > > > > remote web server.  I believe I can use an ado stream to do
> this,
> > > but
> > > > > things are not going too well. At a very basic level should the
> 2
> > > lines
> > > > > of code below work?

> > > > > Set stream = Server.CreateObject("ADODB.Stream")
> > > > > stream.Open "url=http://MyServer/ITR.XML"

> > > > > When I try this I get:

> > > > > Error Type:
> > > > > Microsoft OLE DB Service Components (0x80040E09)
> > > > > Permission denied.
> > > > > /test.asp, line 3

> > > > > I'm using the Wrox ADO 2.6 book as reference (but I think I've
> miss-
> > > > > read something <g>)

> > > > > Sent via Deja.com
> > > > > http://www.deja.com/

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/

 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by peter_ecc.. » Thu, 01 Feb 2001 05:04:05


yep, ADO save
Could it be a HTML header problem?



> How was the XML created?  Via the Recordset's Save method?



> > yep, I even tried the numeric values.



> > > Do you have the following constants defined in your code (or a
> > reference to
> > > the ADO library)?
> > >     adOpenStreamUnspecified
> > >     adModeRead

> > > --

> > > Thanks,
> > > Carl Prothman
> > > Microsoft Visual Basic MVP
> > > http://www.able-consulting.com



> > > > I tried that, with no luck, but I differnt error message.

> > > > Set stream = Server.CreateObject("ADODB.Stream")

stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
Quote:> > > > adModeRead, "username","password"

> > > > I now get:

> > > > Error Type:
> > > > ADODB.Stream (0x800A0BB9)
> > > > Arguments are of the wrong type, are out of acceptable range, or
> > are in
> > > > conflict with one another.
> > > > /test.asp, line 3

> > > > If I leave out adOpenStreamUnspecified and adModeRead and try:

> > > > Set stream = Server.CreateObject("ADODB.Stream")

stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

- Show quoted text -

> > > > I get:

> > > > Error Type:
> > > > Microsoft OLE DB Service Components (0x80004005)
> > > > Unspecified error
> > > > /test.asp, line 3

> > > > I'm I being really dumb here?



> > > > > You need to pass in a Username and Password that has
permissions
> > to
> > > > > http://MyServer

> > > > > --

> > > > > Thanks,
> > > > > Carl Prothman
> > > > > Microsoft Visual Basic MVP
> > > > > http://www.able-consulting.com



> > > > > > I'm using ASP and ADO2.6 to try and retrieve a XML file
held on
> > a
> > > > > > remote web server.  I believe I can use an ado stream to do
> > this,
> > > > but
> > > > > > things are not going too well. At a very basic level should
the
> > 2
> > > > lines
> > > > > > of code below work?

> > > > > > Set stream = Server.CreateObject("ADODB.Stream")
> > > > > > stream.Open "url=http://MyServer/ITR.XML"

> > > > > > When I try this I get:

> > > > > > Error Type:
> > > > > > Microsoft OLE DB Service Components (0x80040E09)
> > > > > > Permission denied.
> > > > > > /test.asp, line 3

> > > > > > I'm using the Wrox ADO 2.6 book as reference (but I think
I've
> > miss-
> > > > > > read something <g>)

> > > > > > Sent via Deja.com
> > > > > > http://www.deja.com/

> > > > Sent via Deja.com
> > > > http://www.deja.com/

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/
 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by Carl Prothma » Thu, 01 Feb 2001 11:59:12


Could be...

Note, I was able to use the 2.6 Stream's Open with a URL to an XML file
(created with Recordset Save) just fine.  I'm using IIS 5.0 (Windows 2000
SP1) with IE 5.5 installed.  And I didn't do anything special with the
header.  Just open the recordset and save as XML. Then use the Stream's Open
with a URL.

Which OS are you using?  And which version of IE do you have installed?


> yep, ADO save
> Could it be a HTML header problem?



> > How was the XML created?  Via the Recordset's Save method?


> > > yep, I even tried the numeric values.



> > > > Do you have the following constants defined in your code (or a
> > > reference to
> > > > the ADO library)?
> > > >     adOpenStreamUnspecified
> > > >     adModeRead

> > > > --

> > > > Thanks,
> > > > Carl Prothman
> > > > Microsoft Visual Basic MVP
> > > > http://www.able-consulting.com



> > > > > I tried that, with no luck, but I differnt error message.

> > > > > Set stream = Server.CreateObject("ADODB.Stream")

> stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
> > > > > adModeRead, "username","password"

> > > > > I now get:

> > > > > Error Type:
> > > > > ADODB.Stream (0x800A0BB9)
> > > > > Arguments are of the wrong type, are out of acceptable range, or
> > > are in
> > > > > conflict with one another.
> > > > > /test.asp, line 3

> > > > > If I leave out adOpenStreamUnspecified and adModeRead and try:

> > > > > Set stream = Server.CreateObject("ADODB.Stream")

> stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

> > > > > I get:

> > > > > Error Type:
> > > > > Microsoft OLE DB Service Components (0x80004005)
> > > > > Unspecified error
> > > > > /test.asp, line 3

> > > > > I'm I being really dumb here?



> > > > > > You need to pass in a Username and Password that has
> permissions
> > > to
> > > > > > http://MyServer

> > > > > > --

> > > > > > Thanks,
> > > > > > Carl Prothman
> > > > > > Microsoft Visual Basic MVP
> > > > > > http://www.able-consulting.com



> > > > > > > I'm using ASP and ADO2.6 to try and retrieve a XML file
> held on
> > > a
> > > > > > > remote web server.  I believe I can use an ado stream to do
> > > this,
> > > > > but
> > > > > > > things are not going too well. At a very basic level should
> the
> > > 2
> > > > > lines
> > > > > > > of code below work?

> > > > > > > Set stream = Server.CreateObject("ADODB.Stream")
> > > > > > > stream.Open "url=http://MyServer/ITR.XML"

> > > > > > > When I try this I get:

> > > > > > > Error Type:
> > > > > > > Microsoft OLE DB Service Components (0x80040E09)
> > > > > > > Permission denied.
> > > > > > > /test.asp, line 3

> > > > > > > I'm using the Wrox ADO 2.6 book as reference (but I think
> I've
> > > miss-
> > > > > > > read something <g>)

> > > > > > > Sent via Deja.com
> > > > > > > http://www.deja.com/

> > > > > Sent via Deja.com
> > > > > http://www.deja.com/

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/

 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by peter_ecc.. » Sat, 03 Feb 2001 04:11:41


I've tried on 2 machines. Win2000 server and Win2000 pro. Both had the
newest ADO installed and were running IE5. I updated the server to
IE5.5 but still get he following error:

Error Type:
Microsoft OLE DB Service Components (0x80004005)
Unspecified error
/xml/test.asp, line 5

Could you send me any sample code? Maybe I'm missing something obvious.

Many thanks



> Could be...

> Note, I was able to use the 2.6 Stream's Open with a URL to an XML
file
> (created with Recordset Save) just fine.  I'm using IIS 5.0 (Windows
2000
> SP1) with IE 5.5 installed.  And I didn't do anything special with the
> header.  Just open the recordset and save as XML. Then use the
Stream's Open
> with a URL.

> Which OS are you using?  And which version of IE do you have
installed?


> > yep, ADO save
> > Could it be a HTML header problem?



> > > How was the XML created?  Via the Recordset's Save method?


> > > > yep, I even tried the numeric values.



> > > > > Do you have the following constants defined in your code (or a
> > > > reference to
> > > > > the ADO library)?
> > > > >     adOpenStreamUnspecified
> > > > >     adModeRead

> > > > > --

> > > > > Thanks,
> > > > > Carl Prothman
> > > > > Microsoft Visual Basic MVP
> > > > > http://www.able-consulting.com



> > > > > > I tried that, with no luck, but I differnt error message.

> > > > > > Set stream = Server.CreateObject("ADODB.Stream")

> > stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
> > > > > > adModeRead, "username","password"

> > > > > > I now get:

> > > > > > Error Type:
> > > > > > ADODB.Stream (0x800A0BB9)
> > > > > > Arguments are of the wrong type, are out of acceptable
range, or
> > > > are in
> > > > > > conflict with one another.
> > > > > > /test.asp, line 3

> > > > > > If I leave out adOpenStreamUnspecified and adModeRead and
try:

> > > > > > Set stream = Server.CreateObject("ADODB.Stream")

> > stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

> > > > > > I get:

> > > > > > Error Type:
> > > > > > Microsoft OLE DB Service Components (0x80004005)
> > > > > > Unspecified error
> > > > > > /test.asp, line 3

> > > > > > I'm I being really dumb here?



> > > > > > > You need to pass in a Username and Password that has
> > permissions
> > > > to
> > > > > > > http://MyServer

> > > > > > > --

> > > > > > > Thanks,
> > > > > > > Carl Prothman
> > > > > > > Microsoft Visual Basic MVP
> > > > > > > http://www.able-consulting.com



> > > > > > > > I'm using ASP and ADO2.6 to try and retrieve a XML file
> > held on
> > > > a
> > > > > > > > remote web server.  I believe I can use an ado stream
to do
> > > > this,
> > > > > > but
> > > > > > > > things are not going too well. At a very basic level
should
> > the
> > > > 2
> > > > > > lines
> > > > > > > > of code below work?

> > > > > > > > Set stream = Server.CreateObject("ADODB.Stream")
> > > > > > > > stream.Open "url=http://MyServer/ITR.XML"

> > > > > > > > When I try this I get:

> > > > > > > > Error Type:
> > > > > > > > Microsoft OLE DB Service Components (0x80040E09)
> > > > > > > > Permission denied.
> > > > > > > > /test.asp, line 3

> > > > > > > > I'm using the Wrox ADO 2.6 book as reference (but I
think
> > I've
> > > > miss-
> > > > > > > > read something <g>)

> > > > > > > > Sent via Deja.com
> > > > > > > > http://www.deja.com/

> > > > > > Sent via Deja.com
> > > > > > http://www.deja.com/

> > > > Sent via Deja.com
> > > > http://www.deja.com/

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/
 
 
 

Using an ADO stream to retrieve xml data from remote website

Post by rklyn » Wed, 07 Feb 2001 07:49:03


What version of the XML parser is used to initially create the XML?


> I've tried on 2 machines. Win2000 server and Win2000 pro. Both had the
> newest ADO installed and were running IE5. I updated the server to
> IE5.5 but still get he following error:

> Error Type:
> Microsoft OLE DB Service Components (0x80004005)
> Unspecified error
> /xml/test.asp, line 5

> Could you send me any sample code? Maybe I'm missing something obvious.

> Many thanks



> > Could be...

> > Note, I was able to use the 2.6 Stream's Open with a URL to an XML
> file
> > (created with Recordset Save) just fine.  I'm using IIS 5.0 (Windows
> 2000
> > SP1) with IE 5.5 installed.  And I didn't do anything special with the
> > header.  Just open the recordset and save as XML. Then use the
> Stream's Open
> > with a URL.

> > Which OS are you using?  And which version of IE do you have
> installed?


> > > yep, ADO save
> > > Could it be a HTML header problem?



> > > > How was the XML created?  Via the Recordset's Save method?


> > > > > yep, I even tried the numeric values.



> > > > > > Do you have the following constants defined in your code (or a
> > > > > reference to
> > > > > > the ADO library)?
> > > > > >     adOpenStreamUnspecified
> > > > > >     adModeRead

> > > > > > --

> > > > > > Thanks,
> > > > > > Carl Prothman
> > > > > > Microsoft Visual Basic MVP
> > > > > > http://www.able-consulting.com



> > > > > > > I tried that, with no luck, but I differnt error message.

> > > > > > > Set stream = Server.CreateObject("ADODB.Stream")

> > > stream.Open "url=http://MyServer/ITR.XML",adOpenStreamUnspecified,
> > > > > > > adModeRead, "username","password"

> > > > > > > I now get:

> > > > > > > Error Type:
> > > > > > > ADODB.Stream (0x800A0BB9)
> > > > > > > Arguments are of the wrong type, are out of acceptable
> range, or
> > > > > are in
> > > > > > > conflict with one another.
> > > > > > > /test.asp, line 3

> > > > > > > If I leave out adOpenStreamUnspecified and adModeRead and
> try:

> > > > > > > Set stream = Server.CreateObject("ADODB.Stream")

> > > stream.Open "url=http://MyServer/ITR.XML",,,"username","password"

> > > > > > > I get:

> > > > > > > Error Type:
> > > > > > > Microsoft OLE DB Service Components (0x80004005)
> > > > > > > Unspecified error
> > > > > > > /test.asp, line 3

> > > > > > > I'm I being really dumb here?



> > > > > > > > You need to pass in a Username and Password that has
> > > permissions
> > > > > to
> > > > > > > > http://MyServer

> > > > > > > > --

> > > > > > > > Thanks,
> > > > > > > > Carl Prothman
> > > > > > > > Microsoft Visual Basic MVP
> > > > > > > > http://www.able-consulting.com



> > > > > > > > > I'm using ASP and ADO2.6 to try and retrieve a XML file
> > > held on
> > > > > a
> > > > > > > > > remote web server.  I believe I can use an ado stream
> to do
> > > > > this,
> > > > > > > but
> > > > > > > > > things are not going too well. At a very basic level
> should
> > > the
> > > > > 2
> > > > > > > lines
> > > > > > > > > of code below work?

> > > > > > > > > Set stream = Server.CreateObject("ADODB.Stream")
> > > > > > > > > stream.Open "url=http://MyServer/ITR.XML"

> > > > > > > > > When I try this I get:

> > > > > > > > > Error Type:
> > > > > > > > > Microsoft OLE DB Service Components (0x80040E09)
> > > > > > > > > Permission denied.
> > > > > > > > > /test.asp, line 3

> > > > > > > > > I'm using the Wrox ADO 2.6 book as reference (but I
> think
> > > I've
> > > > > miss-
> > > > > > > > > read something <g>)

> > > > > > > > > Sent via Deja.com
> > > > > > > > > http://www.deja.com/

> > > > > > > Sent via Deja.com
> > > > > > > http://www.deja.com/

> > > > > Sent via Deja.com
> > > > > http://www.deja.com/

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/

 
 
 

1. Problem with ADO Stream retrieving XML from SQL 2000 in VBScript

Here is my code:

set oCmd = Server.CreateObject("ADODB.Command")
set batchS=Server.CreateObject ("ADODB.Stream")
oCmd.ActiveConnection = "PROVIDER=sqloledb;DATA SOURCE=darke;INITIAL
CATALOG=fieldpro;USER ID=btulogin;PASSWORD=btulogin"
oCmd.CommandType = 4

batchS.Open
oCmd.Properties("Output Stream") = batchRS  <-- Error Here!
oCmd.Properties("Output Encoding") = "UTF-8"
oCmd.Properties("XML Root") = "Batch"
oCmd.CommandText = "w_BTU_BatchType_sp"
oCmd.Parameters.Append oCmd.CreateParameter("batnum",3,1,,103538)
oCmd.Execute , , adExecuteStream

xmlstr=batchRS.ReadText
response.write xmlstr

When I run this in IE 5.x I get, "Application uses a value of the
wrong type for the current operation.", at the line specified above.

I am running a Win2K Server with SQL 2000 and MDAC 2.6. All patched to
latest revs. What I am trying to do is use the Stream object to
retrieve an XML generated result set from a SQL 2000 Sproc using 'FOR
XML AUTO'. It looks like the Command object doesn't understand the
Properties parameter and yet I see examples of it scattered throughout
these postings.

Thanks in advance for your help.

...Chris

2. Where can I find the ole db provider for XML ?

3. Problem using VB to retrieve ASP/XML using ADO recordset

4. Restore Master and User database question

5. Error using ADO stream object with XML FOR auto - Urgent

6. Server dies after intense queries

7. Problem using ADO stream object for result of XML template against SQL 2K

8. Urgent.Connection failed(error:910)

9. Selecting XML into an ADO Stream using multiple select statements

10. Using ADO to write XML to the Response stream

11. Help with ASP/ADO server-side XML->XSL->HTML processing using streams

12. Retrieving data from Exchange 2000 server using ado/ado.net

13. Retrieving XML from SQL Server 2000 using an ado connection object