Home > activex scripting > activex scripting encountered a runtime error

activex scripting encountered a runtime error

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ActiveX Scripting encountered a Run Time Error during the execution of the script up vote 0 down vote favorite I am using an ActiveX script task in my dts package and this has worked for years. However since a week I get the following message just before the send function is called: ActiveX Scripting encountered a Run Time Error during the execution of the script. Server: SQL Server 2000 SP4 Code is: Function Main() SendEmail() Main = DTSTaskExecResult_Success End Function Function SendEmail() Dim dt dt = Date dim CurrentDate CurrentDate = Month(dt) & "/" & Day( dt ) & "/" & Year(dt) Set objMessage = CreateObject("CDO.Message") objMessage.Subject = CurrentDate objMessage.From = "xx@xx.net" objMessage.To = "xx@xx.net" objMessage.HTMLBody = CurrentDate '==This section provides the configuration information for the remote SMTP server. '==Normally you will only change the server name or IP. objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Type of authentication, NONE, Basic (Base64 encoded), NTLM objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'Use SSL for the connection (False or True) objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xx.xx.net" objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xx" 'Your password on the SMTP server objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xx" 'Server port (typically 25) objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMessage.Configuration.Fields.Update objMessage.Send End Function sql-server share|improve this question edited Nov 29 '11 at 5:53 marc_s 450k918621027 asked Nov 28 '11 at 22:01 vikasde 1,98683252 If you post

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is http://stackoverflow.com/questions/8302973/activex-scripting-encountered-a-run-time-error-during-the-execution-of-the-scrip a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up DTS Activex scripting encountered a Runtime error up vote 0 down vote favorite Due to infrastructure limitations, I have to create a DTS package to load a file of 2 Gb into http://stackoverflow.com/questions/35574787/dts-activex-scripting-encountered-a-runtime-error database. After loading, I am moving that file along with the flag file into Archive folder using an Activex script task. Following is the code that I have written. This code works well for a smaller sized file. But it throws error "Activex scripting encountered a Runtime error during the execution of the script" for larger files. Is there any alternative way? Dim oFSO Dim sSourceFile Dim sArchiveFolder Dim sFlagFile Dim sFIleNameArray Set oFSO = CreateObject("Scripting.FileSystemObject") sSourceFile = DTSGlobalVariables("gv_FileName").value sArchiveFolder = "E:\Data\Archive\" sFileNameArray = Split(sSourceFile, ".") sFlagFile = sFileNameArray(0) + ".flag" If oFSO.FileExists(sSourceFile) Then oFSO.CopyFile sSourceFile, sArchiveFolder, True oFSO.DeleteFile sSourceFile End If If oFSO.FileExists(sFlagFile) Then oFSO.CopyFile sFlagFile, sArchiveFolder, True oFSO.DeleteFile sFlagFile End If ' Clean Up Set oFSO = Nothing Main = DTSTaskExecResult_Success sql vbscript sql-server-2000 dts share|improve this question asked Feb 23 at 10:23 turbo88 231314 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+,

New? Advanced Search Forum Database Discussions MS SQL Server 7/MS SQL Server 2000 Runtime Error in DTS Package If this is your first visit, http://forums.databasejournal.com/showthread.php?51502-Runtime-Error-in-DTS-Package be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 6 of 6 Thread: Runtime Error in DTS Package Tweet Thread Tools Show Printable Version Email activex scripting this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 12-16-2009,12:16 PM #1 k6sly View Profile View Forum Posts Registered User Join Date Dec 2009 Posts 3 Runtime Error in DTS Package I have a DTS package that uses Active X to convert a word document to PDF. The package runs fine when called from the command activex scripting encountered line as DTSRun /S "(local)" /N "CreatePDF" /G "{53070739-28A1-4F56-AEE0-CFC7D89CF7E4}" /L "G:\DADocuments\Logfile.txt" /A "Document":"8"="G:\DADocuments\InvNarr09-05093.doc" /W "0" /E. However, when I call this script using xp_cmdshell from a TSQL script it fails with ActiveX Scripting encountered a Run Time Error during the execution of the script. I am running the script using the same user account that the sql server uses so I don't think it's a authentication issue. The only thing I can think of is that the API call to Word is failing. Can anyone find the problem? The Active X script is below: Const WdPrintAllDocument = 0 Const WdDoNotSaveChanges = 0 Function DOC2PDF( sDocFile ) Dim fso ' As FileSystemObject Dim wdo ' As Word.Application Dim wdoc ' As Word.Document Dim wdocs ' As Word.Documents Dim sPrevPrinter ' As String Set fso = CreateObject("Scripting.FileSystemObject") Set wdo = CreateObject("Word.Application") Set wdocs = wdo.Documents sDocFile = fso.GetAbsolutePathName(sDocFile) sFolder = fso.GetParentFolderName(sDocFile) sPrevPrinter = wdo.ActivePrinter wdo.ActivePrinter = "novaPDF" Set wdoc = wdocs.Open(sDocFile, , True ) wdo.ActiveDocument.PrintOut False wdoc.Close WdDoNotSaveChanges wdo.ActivePrinter = sPrevPrinter wdo.Quit WdDoNotSaveChanges Set wdo = Nothing Set fso = Nothing End Function Function Main() Dim sDocFile sDocFile = DTSGlobalVari

 

Related content

activex scripting encountered runtime error

activex scripting encountered runtime error p HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by ActiveX Scripting encountered a Run Time Error during the execution of the script SQL Server SQL Server Integration Services Question Sign in to vote It just stopped running with no changes to the server Any help will be welcomed Message Executed as user IGSLAN svc-finsql DTSRun Loading DTSRun Executing DTSRun OnStart DTSStep DTSActiveScriptTask DTSRun OnError DTSStep DTSActiveScriptTask Error - FE Error string ActiveX Scripting encountered a Run Time Error during the execution of

activex scripting encountered a run time error

activex scripting encountered a run time error p HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by ActiveX Scripting encountered a Run Time Error during the execution of the script SQL Server SQL Server Integration Services Question Sign in to vote It just stopped running with no changes to the server Any help will be welcomed Message Executed as user IGSLAN svc-finsql DTSRun Loading DTSRun Executing DTSRun OnStart DTSStep DTSActiveScriptTask DTSRun OnError DTSStep DTSActiveScriptTask Error - FE Error string ActiveX Scripting encountered a Run Time Error during the