September 10, 2004 at 1:57 am
Hi
absolute novice at this but I have been tasked with
the following:
Given a dts "import text file" task and a bunch of files scattered in different directories, how do I get to them
and process each one from the pkg?
Also, the filename dictates which DB to select - how do I tell DTS which DB to switch to?
All this most probably, has been covered ad naseam -
any guidance would be greatly appreciated
regards
September 13, 2004 at 8:00 am
This was removed by the editor as SPAM
September 13, 2004 at 8:19 am
Not sure I understand the first question - "how do I get to them?" If the locations are fixed and you simply want to cycle through all files (perhaps with a particular name pattern) in the appropriate directories, that is (fairly) easily done in ActiveX scripts. There is a good example of looping through objects at sqldts.com: http://www.sqldts.com/Default.aspx?246
Changing the DB name is the same thing - use ActiveX to parse out the desire connection name and then modify the DTS connection object.
Good luck,
Larry
Larry
September 13, 2004 at 9:03 am
Hello Larry, et al
the major stumbling block is basically that I know zip
about activeX and therefore am a bit reluctant about using it.
(Although, going through BOL, I see that many of the advanced topics
have examples using it - so I reckon I'd better look at it more seriously)
Yes, the problem is a common one, and yes, I did manage to arrive
at a non-activeX 'solution' of sorts: using the "for.." cmd in the humble MSDOS batch file,I eventually managed to get my files into a table!
Thanx for the advice & the URL,will definitely visit
regards
hb
September 17, 2004 at 6:32 am
Hi Larry,
I checked the url but I seem to have a problem with the package because it seems only one file(they are CSV files with the last few digits as dates) is loaded several times into the database. I must be doing something wrong.
Thanks for your anticipated help.
Sam
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy