Using SQL 2000 DTS.
I have an Excel connection named "FileToProcess".
I have a global variable named "gvSourceFilePath" and I have assigned something like this to the Global Variable,
Any number of files will be dropped off in the location defined by the global variable
and they will be named in this format ?????XXXX.xls
????? means I have no idea what this part of the file name will be.
XXXX is a 4 digit number that looks something like this 4700 or 2600 or 3300, there will be 33 variations of this number and the file extension is .xls
I am trying to use Active X to accomplish this task.
This is the rest of my process so you will have the big picture.
Once I get the name of the file, if it is something like ???4700.xls I want to process it by extracting certain columns to text file1 and certain columns to text file2.
I then need to move the resulting text files to a location specific to the file name such as 4700, or 2600, or 3100 files. Again, there are 33 variations for the file names so there will be 33 different destinations.
Here is what I have as of this time.
Dim oConn, sFilename
' Filename format - eXXXX.xls
sFilename = DTSGlobalVariables("gvSourceFilePath").Value & _
sFilename & ".xls"
Set oConn = DTSGlobalVariables.Parent.Connections("FileToProcess")
oConn.DataSource = sFilename
Set oConn = Nothing
Main = DTSTaskExecResult_Success
I would really appreciate it if someone could help me finish this off.
I have beating my head against a wall and I am running out of time.
Thanks to all