Thursday, March 22, 2012

ActiveScripting specific error

Hi,
I have written active script in SQL Server Agent job to
connect to a FTP site using third party FTP/X control.
When I run the job, I get an error as "ActiveScripting
specific error 257 occurred. The step failed".
I tried using the same piece of code in VB 6.0 and its
working fine.
Any advice will be appreciated. Thanks.
regards,
Hemansu
The error is usually due to threading issues. SQL Server,
SQL Agent are multithreaded processes and more than one
thread can access the object. The object may not be able to
handle that due to the threading model it was written under.
Try using a CmdExec step instead of an ActiveX script job
step as CmdExec job steps run in their own thread. You could
write the code to a VB Script file and then execute that
script using CmdExec, e.g.
csript c:\YourScript.vbs
-Sue
On Thu, 9 Sep 2004 16:26:36 -0700, "Hemansu Amin"
<hemansu_amin@.yahoo.com> wrote:

>Hi,
>I have written active script in SQL Server Agent job to
>connect to a FTP site using third party FTP/X control.
>When I run the job, I get an error as "ActiveScripting
>specific error 257 occurred. The step failed".
>I tried using the same piece of code in VB 6.0 and its
>working fine.
>Any advice will be appreciated. Thanks.
>regards,
>Hemansu
|||Thanks Sue. It works!!!

>--Original Message--
>The error is usually due to threading issues. SQL Server,
>SQL Agent are multithreaded processes and more than one
>thread can access the object. The object may not be able
to
>handle that due to the threading model it was written
under.
>Try using a CmdExec step instead of an ActiveX script
job
>step as CmdExec job steps run in their own thread. You
could
>write the code to a VB Script file and then execute that
>script using CmdExec, e.g.
>csript c:\YourScript.vbs
>-Sue
>On Thu, 9 Sep 2004 16:26:36 -0700, "Hemansu Amin"
><hemansu_amin@.yahoo.com> wrote:
>
>.
>
|||Your welcome Hemansu and thanks for posting back that it worked. It
always helps to get verification when something helps work around an
issue.
-Sue
On Thu, 9 Sep 2004 20:37:38 -0700, "Hemansu Amin"
<hemansu_amin@.yahoo.com> wrote:
[vbcol=seagreen]
>Thanks Sue. It works!!!
>
>to
>under.
>job
>could

No comments:

Post a Comment