Hi Daniel,
Thanks for your offer. You stop whenever you feel you spent enough time with me.
I'll recap what I wnat ot do. At the beginning I tough it was a very simple task, now it seems so complicated!
If I were in a VFP application I would simply do this:
pcCompany = "ABC"
pdBegin = "2004/01/01" &&actually a user imput value
pdEnd = "2004/01/31"
SQLEXEC(nConnection, "select * from TimeSheetTable where cConpany = ?pcCompany and dTransaction >= ?pdBegin and dTransaction <= ?pdEnd , lcMyCursor)
lcFileName = "MySubDirectory\MyUserIDFile.txt"
Select lcMyCursor
Copy To &lcfileName DELIMITED
Basically I want any user being able to extract specific data into a file of their own, it has to be very secure, make sure peoples don't see other's company data. And I want many users being able to extract data at the same time, 'cause I have no control over that.
Peoples in this group suggested I use DTS, so I read about DTS and try a few things but I see no information as how to pass specific parameters to DTS and I still don't know if it's possible for a DTS to create a file which name is not hard coded in the DTS itself.
For parameters here's an idea I haven't try yet: if I create a SP with parameters, inside the SP declare some variables and I call the DTS from inside the SP, will the DTS read the variable's values and use them?
As for the resulting file name and location I have no idea. I tried to put a file name like "@file" but the DTS wouldn't save, it's seems I have to put a real name... That's the no go aspect, I need a defferent file name each time the DTS is called and I need to be able to show that name to the user once it's being created.
Diane Robitaille eng.