I want to put filenames from a folder on the servers hard drive into a table in my DTS Package SQL Server OLEDB connection. I can do this by issuing a "dir" command and directing the output into a text file on the hard drive, and then importing the text file with a data pump, and the inserting the filenames into the table using an ExecuteSQL task. This seems like a very caveman way of doing this, however.
What I want to do is use an ActiveX Script task; declare a folder object and a files collection; then loop through the files collection, inserting each file name into the SQL table using a SQL Query in the ActiveX Script task.
The problem is, I don't know how to execute a SQL Query on the existing SQL Connection in my DTS package from inside the ActiveX Script task. How would I do this?
What I want to do is use an ActiveX Script task; declare a folder object and a files collection; then loop through the files collection, inserting each file name into the SQL table using a SQL Query in the ActiveX Script task.
The problem is, I don't know how to execute a SQL Query on the existing SQL Connection in my DTS package from inside the ActiveX Script task. How would I do this?