November 7, 2002 at 6:21 am
How can I pass the following parameters from an ini file to a stored procedure within a DTS package. The parameters in the ini file looks like:
[DatabaseCleaner]
! -- TableToBeCleaned_N=<table name>,<months to hold on db>,<months to hold on hd>
! -- <N> must be a successive number starting from 1 ...
TableToBeCleaned_1=Transactions,24,24
TableToBeCleaned_2=Payments,24,24
TableToBeCleaned_3=PresenceTickets,24,24
As I do not know how many tables that will be declared in the ini file I have to loop through until the last parameters and pass it over to the SP.
Any idea?
Thanks
mipo
November 7, 2002 at 10:42 am
I think I would use an ActiveX task object and create a script that loops through your ini file. This script would then build a dynamic SQL statement and include all the parameters. Another way you could do it would be to have your script create a global variable for each parameter in your ini file...but then how will your stored procedure know how many variables are needing to be passed in? Anyway, just some ideas...
hth,
Michael
Michael Weiss
Michael Weiss
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply