August 31, 2001 at 6:09 pm
Hi,
I have a requirement in which i need to pass the SQL query, output file name to the DTS package dynamically from my VB code.Is this possible using DTS?..
Thanks,
seshu
August 31, 2001 at 8:01 pm
It is possible, you just need to get a bit deeper into the guts of your DTS package. What version of SQL are you running?
September 3, 2001 at 1:34 pm
Thanks Burke,
I am using Sql Server 2000.I appreciate if u can give me any info to help dig deep into this.
September 3, 2001 at 6:40 pm
You have a few options; you can export the dts package as a vbs file and incorporate that directly into your code; you can set up a dynamic properties task to alter the individual task properties (such as an executre sql task - you can change the sql statemetn through in .ini file, or something similar). Can you describe your DTS package in more detail? That may help pinpont the best way to arrive at a solution.
Sean
September 4, 2001 at 1:10 pm
My DTS package needs to convert the result of a sql statement into different file formats like txt, csv and DBF. IT should take File name, file path, SQL statement dynamically.
Any chance that I can use BCP in my VB code to generate Txt and CSV files by passing parameters dynamically?
September 5, 2001 at 7:59 pm
I dont see why not. BCP is a command line app, so you just need to build the entire string of bcp.exe plus all the parameters you need, then execute it.
Andy
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply