Home > activex scripting > activex scripting encountered a run time error

Activex Scripting Encountered A Run Time 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) obj

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 http://stackoverflow.com/questions/8302973/activex-scripting-encountered-a-run-time-error-during-the-execution-of-the-scrip 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 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 http://stackoverflow.com/questions/35574787/dts-activex-scripting-encountered-a-runtime-error load a file of 2 Gb into 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

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, be sure to check out the FAQ by clicking the link http://forums.databasejournal.com/showthread.php?51502-Runtime-Error-in-DTS-Package above. You may have to register before you can post: click the register link above http://www.sql-server-performance.com/forum/threads/problem-executing-dts-package-on-win-server-2003.19250/ 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 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 activex scripting 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 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 activex scripting encountered 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 = DTSGlobalVariables("Document").value Call DOC2PDF( sDocFile ) Set arguments = Nothing set sDocFile = Nothing Main = DTSTaskExecResult_Success End Function Reply With Quote 12-17-2009,09:05 AM #2 rmiao View Profile View Forum Posts Moderator Join Date Sep 2002 Posts 5,938 Does it access remote file? If so, sql service account needs permission on it. Reply With Quote 12-17-2009,11:09 AM #3 k6sly View Profile View Forum Posts Registered User Join Da

Problem executing DTS package on Win Server 2003 Discussion in 'SQL Server DTS-Related Questions' started by tstradli, Aug 7, 2006. tstradli New Member Hi I have a SQL Server 2000 DTS package that instantiates a JAVA object and completes a HTTP post. This package works fine when I run on Windows XP however now I have moved from my development environment to test on a Windows 2003 environment I am getting the following error. DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE) Error string: ActiveX Scripting encountered a Run Time Error during the execution of the script. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4500 Error Detail Records: Error: -2147220482 (800403FE); Provider Error: 0 (0) Error string: ActiveX Scripting encountered a Run Time Error during the execution of the script. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4500 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun: Package execution complete. NULL I have read herehttp://support.microsoft.com/default.aspx?scid=kb;EN-US;q298725 that this is likely a permission problem with creating the JAVA object either because my COM security permissions are not correct or DTS is not in the registry. However I have verified my COM security is correct and run the DTS dlls into the registry and I am still getting this error. Also note that the version of JRE on the machine that is not working on is later than that on the machine where it is working. Does anyone know another reason for this error on Win Server 2003? How do I use the Help file: sqldts80.hlp and associated Help context: 4500 message to research my issue? Many thank

 

Related content

activex scripting encountered runtime error

Activex Scripting Encountered Runtime Error p here for a quick overview of the relatedl 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 million programmers just like you helping each other Join them it only takes a minute Sign up ActiveX Scripting encountered a Run Time

activex scripting encountered a runtime error

Activex Scripting Encountered A Runtime Error p HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users relatedl 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