Database
  Home arrow Database arrow Page 4 - Using Data Transformation Services: Can We...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE

Using Data Transformation Services: Can We Transfer XML Data?
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2006-01-02

    Table of Contents:
  • Using Data Transformation Services: Can We Transfer XML Data?
  • Implementing DTS Transfer of XML
  • DTS Design Details
  • The ActiveX Script
  • ActiveX Script Based Data transfer implementation

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Data Transformation Services: Can We Transfer XML Data? - The ActiveX Script


    (Page 4 of 5 )

    The ActiveXScript will glue the query result to the Global variable as well as persist the XML to an XML file. The following script is used in this task. The script instantiates (creates) an ADODB.Recordset, and to this the Global Variable is assigned. The Recordset is saved as an XML file. The scripting interface in DTS is very strict; make sure that the syntax is as close to the one shown as possible.

    '**********************************************************************
    '  Visual Basic ActiveX Script
    ' Jayaram Krishnaswamy
    '************************************************************************
    Function Main()
    dim RS
    set RS = CreateObject ("ADODB.Recordset")
    set RS = DTSGlobalVariables("NewXMLDTS").value 
    rs.save "C:\Documents and Settings\computer user\Desktop\Nov7\
    Newxml.xml", _ adPersistXML Main = DTSTaskExecResult_Success End Function

    Also a Workflow item is added to make the script run only after a successful run of the ExecuteSQL task. The package is saved after making sure none of the individual items are not highlighted.

    DTS Package run results

    This package runs successfully and a file will be created in the location where it is saved. If this file is displayed in the browser, what you will see is the following:

    Source view of browser display

    This is pretty ugly and useless. Now let's take a look at the source view of this browser output. You will see the following. In addition to what was seen in the Query Analyzer result, other offending characters may also be present. The source view may be cleaned up through some filtering, but this is not a clean solution.

    More Database Articles
    More By Jayaram Krishnaswamy


       · Here is another interesting tutorial on DTS as related dealing with XML. There are...
     

    DATABASE ARTICLES

    - Excel Reference
    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT