ADO 2.6 and WSH/ASP 
Author Message
 ADO 2.6 and WSH/ASP

How can I use ADO 2.6 objects in WSH?
I need to persist a recordset in XML format. I've tried with a statement
like this:

rsMyRecordset.Save "myFile.xml",adPersistXML

It works fine in VB 6.0 and VBA (adding a reference to  "ActiveX data ojects
2.6" library) but it fails in WSH and ASP pages.

thanks

Fabio



Fri, 25 Jul 2003 17:24:15 GMT  
 ADO 2.6 and WSH/ASP

For WSH hosted scripts, use the WSF format and the following XML tag:

<reference object="ADODB.Recordset" version="2.6" />

In an ASP page, the equivalent is:

<!--METADATA TYPE="TypeLib"
uuid={00000206-0000-0010-8000-00AA006D2EA4}
-->

or to always reference the "current" version typelib info:

<!--METADATA TYPE="TypeLib"
FILE="C:\Program Files\Common Files\System\ado\msado15.dll"
-->

usually placed in global.asa

Or define the named constant(s) locally.

Const adPersistXML = 1

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> How can I use ADO 2.6 objects in WSH?
> I need to persist a recordset in XML format. I've tried with a statement
> like this:

> rsMyRecordset.Save "myFile.xml",adPersistXML

> It works fine in VB 6.0 and VBA (adding a reference to  "ActiveX data ojects
> 2.6" library) but it fails in WSH and ASP pages.

> thanks

> Fabio



Sat, 26 Jul 2003 01:17:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help with using ADO in WSH not ASP.

2. gs5.10 and solaris 2.6

3. Install On Sun Solaris 2.6

4. GhostView >2.6

5. Compiling Ghostscript 6.01 Solaris 2.6 Sparc

6. FYI - Microsoft Data Access Components 2.6 RTM (2.60.6526.3) Now Available

7. Installing gs-5.5.0 on Solaris 2.6...

8. Ghostscript 5.50 and Solaris 2.6

9. GSView 2.6 problem

10. Problem with Aladdin GSView 2.6

11. Can't print from GSVIEW 2.6 for OS/2

12. gs5.50 compilation on Solaris 2.6

 

 
Powered by phpBB® Forum Software