473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to export xml in dts "Excute SQL Task" to a flat file

6
Hi Guys,

I included "for xml auto" in sql statement in "Excute SQL Task" and aimed to dump the output to a flat file. I added "ActiveX Script Task" into my package and with the following lines:

dim strRecord
dim objFSO
dim objStream
dim objResults

const OUTPUT_FILE = "c:\XmlOutput.txt"
const fsoForWriting = 2

set objFSO = CreateObject("Scripting.FileSystemObject")
set objStream = objFSO.OpenTextFile(OUTPUT_FILE, fsoForWriting, true)
set objResults = DTSGlobalVariables("gResults").Value

Where "gResults" is my Rowset output parameter set as a global variable. If without "for xml auto" clause I could get my result something like:

strRecord = objResults.Fields(0).value & " " & objResults.Fields(1).value
objStream.WriteLine(strRecord)

in a loop to dump the result to my flat file. With "for xml auto" clause "objResults.Fields(0).value" is not working any more. Any suggestions what I am going to do in this situation?

Regards,
Aug 1 '06 #1
0 4401

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Tom | last post by:
I've forgotten how to add a particular line to the task list in vs2003 before there was a context menu that you can click on to add something to task and come back to later.. but now I can't find...
4
by: Leeor Chernov | last post by:
Hi , I Used the object Excell Application(COM INTEROP) and it is staying as an open process, And the owner(User Name) is ASPNET Altough I try to release it with :...
0
by: SpockMonster | last post by:
Our solution contains multiple projects, such as: 1 Web project 3 library projects that contain Serviced Components 7 library projects that do not contain Servicded Components Long ago, a...
6
by: Tony Wong | last post by:
I have a C++ project (assembly) and a C# project (client that uses the C++ assembly). These projects used to work when compiled under VS 2003 but when I upgraded my projects to VS 2005 I got the...
0
by: gelangov | last post by:
I have a table, that has a column which determines the file name. I want to export a file and rename it immediately. For Ex: Select Id, count(*) from Mytable group by ID gives the...
4
by: e-Ricc | last post by:
Hi guys! Im trying to detect when a user "kills" my c# app using windows task manager, i've tried with the form events _closing and _closed managing for example putting an if inside to detect...
0
by: Rahul | last post by:
Hello, Is it possible (by code) to set a timer and "force" the computer to wake up from hibernation/standby/sleep mode (either at specific time... or after specific interval) through C# code? ...
4
by: AliRezaGoogle | last post by:
Dear Members I have a critical program written in c#. It runs every time the user log on. But sometimes log-oned user forces my application process to quit by “End Process” in task manager. How...
1
by: vikassawant | last post by:
hi, I am using external POI package to perform excel import and export task in my project.This package is present at C drive on my machine. When I execute this project at command prompt it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.