Groups | Blog | Home
all groups > sql server dts > january 2007 >

sql server dts : why my asp script failes to process DTS with access database connection?


Mint
1/12/2007 7:13:51 AM
i want to run an asp script to run DTS packedge.
i have created the packedge in the sql server. only include a
connection to access database
and a only a sql task (select * from acctbl).
i can run the dts successfully in the sql server.
but i can't run it in the Asp script.
when i change the connection to a sql database. it is successfully.
why it faild?
the asp script is right i think.

dim objDTSPackage
dim objDTSStep
dim strResult
dim blnSucceeded

const DTSSQLStgFlag_Default = 0
const DTSStepExecResult_Failure = 1

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

objDTSPackage.LoadFromSQLServer servername, usrname, pwd,
DTSSQLStgFlag_Default2, "", "",

"", dtsname
objDTSPackage.Execute

for each objDTSStep in objDTSPackage.Steps
if objDTSStep.ExecutionResult = DTSStepExecResult_Failure then
strResult = strResult & "Package " & objDTSStep.Name & " failed.<br>"
blnSucceeded = false
else
strResult = strResult & "Package " & objDTSStep.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
end if


can anyone help?
thanks!
Allan Mitchell
1/13/2007 10:16:12 AM
OK so there is nothing in your ASP code that does anything other than
execute the package so there is nothing wrong with the code here (it
executes the package). The problem will be in the use of Access as a
data source in the package. What error do you get?





--


Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com




[quoted text, click to view]
AddThis Social Bookmark Button