Is This Possible?

Posted on 2006-04-25
Last Modified: 2010-04-23
Hey Guys,

I currently have a SQL Server DTS Package that imports a fixed formatted text file from my hard drive into a SQL Server table.  I execute the DTS package from my windows application.

This process works fine, but what I would like to do is use the OpenFileDialog class to allow the user to choose which file they would like to import, instead of using the default file name and location as specified in the DTS Package.  Is is possible to send the path of the file into the DTS package as a parameter?


Question by:dchau12
    LVL 6

    Accepted Solution


    The DTSRun utility has a /A parameter that allows you to set the values of a global variable. This can then be used to set the filename. If the name is
    consistent you should be able to do this in code without passing a value.

    Take a look at this:

    Author Comment

    Thanks for the input.  I will read that article.

    I ended up using FileInfo objects to move the file that the user selected through the file dialog box into the directory that my DTS Package is pulling from.  It allows the user to select the file, and then behind the scenes moves the file where I need it withough sending the files directory path into the DTS package.

    Thanks for the response though.


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now