Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-09-06 : 07:32:23
|
Lynne writes "Hi,Can someone show me how to loop through a records set, execute a select statement to export data into a text file and ftp it. I need one text file per company Id, I am doing this in DTS using ActiveX script, this is what i have so far:Funtion Main()Dim oRsDim strSQLset ors = DTSGlobalVariables("RSTables").valueDTSGlobalVariables("strSQL").value = "SELECT * FROM " & ors.fields(4) & " WHERE companyId = " & ors.fields(0)ors.movenextset ors = nothingmain = DTSTaskExecResult_successEnd FunctionIs there a way for me to do this: as I loop through the recordset, execute the select statement to export the data to a text file and ftp the file? TIA " |
|
|
|
|