I tried with the code given in site mentioned by you but unfortunately that code also not working properly with me. I have two stpes in my DTS.First step is to delete the records from table and second step is upload the excel data into table . When I used the code that is given on site I got following problem.
Step [DTSStep_DTSDataPumpTask_1] failed --this step fails here DtS access --the excel file and uploads into table
Task "Transform Data Task: Excel upload to databse"
--this step succeeded it deletes rcords from table.
Step [DTSStep_DTSExecuteSQLTask_1] succeeded
Task "Execute SQL Task: undefined"
Package DTSName failed
From above problem I got only that I can access and executes DTS , but still problem is there may be with excel file.I am not able to see the logs of DTS when I execute it from code..
I am not able to get what is the problem? So I tried with XP_CMDSHELL.