Importing data from a file to a table where filename is based on data in a table
Posted on 2004-11-29
I have been researching for the pass two weeks and I am unable to find the code that will pass a filepath and filename (which are stored in a table) open that file and import the data plus 1 field for the project number(is the filename) into an existing table. So far I have a DTS package that determines which files are needed to be imported and updating the ProjectDemand table. What I am confused on how to pass as a variable the filename and then have DTS import that data into the ProjectDemand table. I have looked ta the code on SQLDTS.com (Looping, Importing and Archiving) unfortunately I get a "Bad Directory" error and I am unable to find a solution to correct this isssue, so I am hoping somenone has a better idea. I tried setting the global variables on the DTS package, but how to I tell the DATA Drivien Query tool to use the varialbe in the path for the source.