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 |
apociecha
Starting Member
17 Posts |
Posted - 2003-02-11 : 17:39:12
|
I created a DTS package and it runs without any problems from within Enterprise Manager. However, when I call it from an ASP page (which runs successfully), the DTS packages is magically executed 5 times. I can see that because it genertes 5 logs when it runs. And if I do not delete data prior to the import(which is what my DTS package does), I get 5 copies of my import file in the table.Any help you can provide, would be greatly appreciated. Agnes |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-02-11 : 18:02:39
|
We are going to need to see the code that you use to call the DTS package. |
 |
|
apociecha
Starting Member
17 Posts |
Posted - 2003-02-11 : 19:37:32
|
Below is the ASP code I used to call the DTS package. Thanks VERY MUCH for taking a look at it.Agnes<%dim objDTSPackage dim objDTSStep dim strResult dim blnSucceeded const DTSSQLStgFlag_Default = 0 const DTSStepExecResult_Failure = 1set objDTSPackage = Server.CreateObject("DTS.Package") objDTSPackage.LoadFromSQLServer "(local)", "sa", "", DTSSQLStgFlag_Default, "", "", "", "myPackageName" objDTSPackage.Execute blnSucceeded = true for each oStep In objDTSPackage.Steps if oStep.ExecutionResult = DTSStepExecResult_Failure then strResult = strResult & "Package " & oStep.Name & " failed.<br>" blnSucceeded = false else strResult = strResult & "Package " & oStep.Name & " succeeded.<br>" end if next if blnSucceeded then Response.Write "<h1>Package Succeeded</h1>" else Response.Write "<h1>Package Failed</h1>" end if Response.Write strResult %> |
 |
|
|
|
|