I have a DTS package that I created that takes an Excel spreadsheet file and imports it into a SQL Server 2000 database, as a table.
First, it drops the existing table, then creates the table based on a T-SQL script, then it imports the Excel spreadsheet fields and data into the newly created table.
I used the DTS Import/Export Wizard to create the import tasks from Connection 1 (Excel spreadsheet) to Connection 2 (specified SQL Server database). Then, I used the DTS Designer in Enterprise Manager to add the Execute SQL Tasks for drop table and create table, and applied the workflows.
It all works fine. My issue is that for Connection 1’s File Name property (specifying the database path and file name holding the data for import), I hard coded a path/file name, but what I would like to do is take the File Name property and add end-user flexibility by allowing the File Name to be based on a path and file specified during run-time by the end user via a common dialog box (like in VBA/VB). Is there any way to accomplish this using a DTS package? Using an ActiveX Script?
What I want is dynamic configuration of a DTS package object, in this case a Connection object. Can I pass a variable to a Connection object? Any ideas?
Any assistance would be greatly appreciated.
Thanks,
CherylDixon
First, it drops the existing table, then creates the table based on a T-SQL script, then it imports the Excel spreadsheet fields and data into the newly created table.
I used the DTS Import/Export Wizard to create the import tasks from Connection 1 (Excel spreadsheet) to Connection 2 (specified SQL Server database). Then, I used the DTS Designer in Enterprise Manager to add the Execute SQL Tasks for drop table and create table, and applied the workflows.
It all works fine. My issue is that for Connection 1’s File Name property (specifying the database path and file name holding the data for import), I hard coded a path/file name, but what I would like to do is take the File Name property and add end-user flexibility by allowing the File Name to be based on a path and file specified during run-time by the end user via a common dialog box (like in VBA/VB). Is there any way to accomplish this using a DTS package? Using an ActiveX Script?
What I want is dynamic configuration of a DTS package object, in this case a Connection object. Can I pass a variable to a Connection object? Any ideas?
Any assistance would be greatly appreciated.
Thanks,
CherylDixon