dbTalk Databases Forums  

Error on executing DSP package via ASP

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Error on executing DSP package via ASP in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
presanna
 
Posts: n/a

Default Error on executing DSP package via ASP - 09-10-2003 , 05:18 PM







Hi,



I am trying to execute a DTS package, that clears the contents of a
table t_test, from ASP. The code looks as follows:



'-----------------------------------------------------------------------
--------------

dim objDTSPackage

dim objDTSStep

dim strResult

dim blnSucceeded



const DTSSQLStgFlag_Default = 0

const DTSStepExecResult_Failure = 1



set objDTSPackage = Server.CreateObject("DTS.Package")

blnSucceeded = true



vPackage = "TestPackage2"



objDTSPackage.LoadFromSQLServer "dev", "sa", "password",
DTSSQLStgFlag_Default, "", "", "", vPackage



objDTSPackage.Execute



for each objDTSStep in objDTSPackage.Steps

if objDTSStep.ExecutionResult = DTSStepExecResult_Failure then

strResult = strResult & "Step " & objDTSStep.Name & "

failed.<br><br>"

blnSucceeded = false

else

strResult = strResult & "Step " & objDTSStep.Name & "

succeeded.<br><br>"

end if

next



if blnSucceeded then

vResult = "<h1>Package Succeeded</h1>"

else

vResult = "<h1>Package Failed</h1>"

end if



Set objDTSPackage = Nothing

'-----------------------------------------------------------------------
--------------



This on execution gives the following error:

"Step DTSStep_DTSExecuteSQLTask_1 failed"



The package works fine and does the required task when executed
manually.



I guess the error is due to a permission problem. But both IIS and SQL
are on the same server.



Can anyone point out what I could be missing?



Thanks a bunch in advance

Sri


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
Rand Boyd [MS]
 
Posts: n/a

Default RE: Error on executing DSP package via ASP - 09-11-2003 , 10:27 AM






Check out the following Microsoft article:

INF: Execute a SQL Server DTS Package from Active Server Pages
ID: 252987

Rand


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.