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