![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am working on building an app for logging credit card transactions. I made a small excel file that the users edit and the user edits the file and then the file is DTS'd into a SQL Server database. Is it possible to dynamically build a DTS package that reads the Cardholder table to find out what and where to get the files to be imported? The Excel files are stored as follows, SERVER1/Reports/CreditCardLog/*Username*/*username*.xls |
#3
| |||
| |||
|
|
Hi Drew "Drew" wrote I am working on building an app for logging credit card transactions. I made a small excel file that the users edit and the user edits the file and then the file is DTS'd into a SQL Server database. Is it possible to dynamically build a DTS package that reads the Cardholder table to find out what and where to get the files to be imported? The Excel files are stored as follows, SERVER1/Reports/CreditCardLog/*Username*/*username*.xls that's possible. You have to query the card table to get a list of files to import - define the result of the sql task as rowset global variable to use later. Then you have to loop through an import/transform section where the starting ActiveX task changes the file path of the excel connection. Take care to set the close connection on completion workflow property for the transform, because otherwise you won't be able to change the excel file from loop to loop. Look here for examples http://www.sqldts.com/default.aspx?246 http://www.sqldts.com/default.aspx?298 HTH Helge |
#4
| |||
| |||
|
|
Ok... I have been looking at http://www.sqldts.com/default.aspx?298 and have been trying to follow it, but am getting the following error when I try to run the package, Step 'DTSStep_DTSActiveScriptTask_BuildMsgBoxString' was not found. The BuildMsgBoxString is in the package and everything is spelled correctly. The package runs fine if the SQL Task only returns 1 record, but if there are more than 1 it fails. What have I done wrong? |
#5
| |||
| |||
|
|
Hi Drew, Drew wrote: Ok... I have been looking at http://www.sqldts.com/default.aspx?298 and have been trying to follow it, but am getting the following error when I try to run the package, Step 'DTSStep_DTSActiveScriptTask_BuildMsgBoxString' was not found. The BuildMsgBoxString is in the package and everything is spelled correctly. The package runs fine if the SQL Task only returns 1 record, but if there are more than 1 it fails. What have I done wrong? there is one special thing to consider. If you want to manipulate DTS steps and tasks, you have to address them by there internal name, which is by default build from there task type and an incremented number. The above step name is manually changed by Darren to allow easier and unique addressing of step - your step will have a diferent name if you haven't copied the example. You can see and change the step and task names with the "disconnected Edit" option, when you right click inside the designer. Just go there and drill down to get a feeling how DTS works. Helge |
#6
| |||
| |||
|
|
Nice... I see now! I have used DTS in the past, but just for quick imports, nothing else... I will take a look, you will probably see more questions from me on this topic, so I hope you all don't mind. Thanks, Drew "Helge C. Rutz" <news050424 (AT) nurfuerspam (DOT) de> wrote in message news:3fep5hF7dv3fU1 (AT) individual (DOT) net... Hi Drew, Drew wrote: Ok... I have been looking at http://www.sqldts.com/default.aspx?298 and have been trying to follow it, but am getting the following error when I try to run the package, Step 'DTSStep_DTSActiveScriptTask_BuildMsgBoxString' was not found. The BuildMsgBoxString is in the package and everything is spelled correctly. The package runs fine if the SQL Task only returns 1 record, but if there are more than 1 it fails. What have I done wrong? there is one special thing to consider. If you want to manipulate DTS steps and tasks, you have to address them by there internal name, which is by default build from there task type and an incremented number. The above step name is manually changed by Darren to allow easier and unique addressing of step - your step will have a diferent name if you haven't copied the example. You can see and change the step and task names with the "disconnected Edit" option, when you right click inside the designer. Just go there and drill down to get a feeling how DTS works. Helge |
#7
| |||
| |||
|
|
Ok... I changed the name of the Step and now it works, but when I changed the name, the Workflow arrow went away.. How can I get this back? It's not necessary, but nice to see what is happening. |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
Hi Drew, Drew wrote: Ok... I changed the name of the Step and now it works, but when I changed the name, the Workflow arrow went away.. How can I get this back? It's not necessary, but nice to see what is happening. thats because the precedense constraints are based on the names too. Now you have a constraint for a non existing step, which you should change also. Generally you should change names, if you ever need to, before you define the workflow to avoid this. Helge |
![]() |
| Thread Tools | |
| Display Modes | |
| |