Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Changing Excel Connection

Author  Topic 

kvangor
Starting Member

13 Posts

Posted - 2006-05-16 : 10:35:28
Hi,

I'm using DTS to load Excel files to a SQL database. There's an Excel file for each country (17 of them). I want to avoid having to create a separate DTS package for each country. Is there a way to dynamically change the file name in an Excel file connection? This would help me out tremendously, especially with maintenance.

Any help would be great!

Thanks!!!

sshelper
Posting Yak Master

216 Posts

Posted - 2006-05-16 : 16:06:23
Here's a link that may be able to help you:

http://www.sqldts.com/default.aspx?246

For other ways to import Excel files without using DTS, you may also refer to the following links:

http://www.sql-server-helper.com/tips/read-import-excel-file-p01.aspx
http://www.sql-server-helper.com/tips/read-import-excel-file-p02.aspx
http://www.sql-server-helper.com/tips/read-import-excel-file-p03.aspx

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page

kvangor
Starting Member

13 Posts

Posted - 2006-05-17 : 16:08:32
Thanks for the links!

I actually discovered the Dynamic Properties task within DTS which should help me do what I want to do. The trouble is I'm having a hard time getting it to work.

I have a parent package that calls a number of different child packages. I'm trying to pass a Global Variable with the excel file location to the child package to change the excel file connection using the Dynamic Properties task. I keep getting a "execution canceled by user" error. If I just declare the global variable from within the child package and run the package directly it works fine.

From what I'm reading I should be able to pass a global variable from the parent to child and have that global variable used by the dynamic properties task. If this is correct, what could I be doing wrong?

Thanks in advance for any assistance!

Kevin
Go to Top of Page
   

- Advertisement -