|
top
|
 Subject: Re: Does Stylus Studio provide API for ADO Wizard Author: (Deleted User) Date: 14 Apr 2003 03:46 PM
|
Hi Nestor,
At 15.39 14/04/2003 -0400, you wrote:
>From: "Nestor Bucosky"
>
>I would like to use the functionality that is provided by the "XML from
>ADO" wizard in a "batch" mode for the purposes of automation.
>
>Does Stylus Studio provide an API or a hook that I can use to invoke this
>functionality ?
Stylus doesn't provide a command line tool to create XML files from a
database, but you can directly use ADO.
The VB code to perform the "XML from ADO" functionality is:
==============================
Dim rsXML As New ADODB.Recordset
Dim sSQL As String, sConn As String
sSQL = "SELECT customerid, companyname, contactname FROM customers"
sConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Common
Files\System\msadc\samples\NWind.mdb"
rsXML.Open sSQL, sConn
rsXML.Save "c:\nwind.xml", adPersistXML
==============================
You should be able to easily build a Visual Basic application, or a
VBScript file starting from this code.
Hope this helps,
Alberto
|
|
|