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 - 2001-02-02 : 11:54:35
|
Abdul writes "I would like to call a DTS package that I have created in SQL from an ASP Page using VBScript. It works if the program is created in VB but in VBScript nothing happens as in no data is sent to the table in question. I have been to the microsoft site and they have a piece of code (slightly modified):
Dim oPackage, strResult Const DTSReposFlag_Default = 0 Const DTSReposFlag_UseTrustedConnection = 256 const DTSStepExecResult_Failure = 1 const DTSStepExecResult_success = 0 Set oPackage = Server.CreateObject("DTS.Package") oPackage.LoadFromSQLServer "LON025","sa","abdul",256,"","","","dts_import_pricelist_data" oPackage.Execute() 'iStatus = true Response.Write "Executing package... " For i = 1 To oPackage.Steps.Count If oPackage.Steps(i).ExecutionResult = DTSStepExecResult_Failure Then oPackage.Steps(i).GetExecutionErrorInfo (lpErrorCode) iStatus = False strResult = oPackage.Steps(i).Name + " in the '" + oPackage.name + "' failed. " elseif oPackage.Steps(i).ExecutionResult = DTSStepExecResult_success Then iStatus = true strResult = oPackage.Steps(i).Name + " in the '" + oPackage.name + "' succeded. " End If Response.Write strResult & vbcrlf Next If iStatus = True Then strResult = oPackage.Description + " Successful " Response.Write strResult End If Response.Write "Done. " 'release the object set oPackage = nothing
SQL SERVER 7.0, IIS 5.0, ASP(ADO 2.5) MS Link: http://support.microsoft.com/support/kb/articles/Q252/9/87.ASP?VOTE=2 But this does not work either. PLEASE HELP!!!!" |
|
|
|
|
|