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-11-12 : 13:48:58
|
kuladeep writes "I have the following code in an ActiveX script within a dts package on Sql Server 7.0. When I execute the package manually, the code works fine. When I try to schedule a job to execute the package, i get the error message at the bottom. The error message is pointing to the line: Set oNameSpace = oApp.GetNamespace("MAPI")I have been banging my head on the desk for weeks on this one, so if someone could help me out, I would be forever grateful.Dim oApp As Outlook.ApplicationDim oNameSpace As NameSpaceDim oFolder As MAPIFolderDim omailitem As MailItemSub RunStrip() Set oApp = CreateObject("Outlook.Application") Set oNameSpace = oApp.GetNamespace("MAPI") Set oFolder = oNameSpace.GetDefaultFolder(olFolderInbox) For Each omailitem In oFolder.Items If omailitem.Attachments.Count <= 0 Then omailitem.Delete End If NextExit Sub******************************************This is the error message that I receive from SQL serverDTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSActiveScriptTask_2 DTSRun OnError: DTSStep_DTSActiveScriptTask_2, Error = -2147220482 (800403FE) Error string: Error Code: 4096 Error Source= Microsoft Outlook Error Description: Could not complete the operation because the service provider does not support it. Error on Line 40 Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts.hlp Help context: 1100 Error Detail Records: Error: -2147220482 (800403FE); Provider Error: 0 (0) Error string: Error Code: 4096 Error Source= Microsoft Outlook Error Description: Could not complete the operation because the service provider does not support it. Error on Line 40 Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts.hlp Help context: 1100 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_2 DTSRun: Package execution comp. The step failed." |
|
|
|
|
|