Need DTS Help

  • 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

  • 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?

  • Thanks Burke,

    I am using Sql Server 2000.I appreciate if u can give me any info to help dig deep into this.

  • 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

  • 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?

  • 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