Is This Possible?

Posted on 2006-04-25
Medium Priority
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 vb.net 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

Accepted Solution

JRossi1 earned 1000 total points
ID: 16537567

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:  http://www.sqldts.com/default.aspx?292

Author Comment

ID: 16537681
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

840 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